Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async setupFoxdriver () {
await _connectAsync({
host: '127.0.0.1',
port: 2929,
})
const foxdriver = await Foxdriver.attach('127.0.0.1', 2929)
const { browser } = foxdriver
const attach = Promise.method((tab) => {
return tab.memory.attach()
})
cb = () => {
return browser.listTabs()
.then((tabs) => {
browser.tabs = tabs
return Promise.mapSeries(tabs, (tab: any) => {
return attach(tab)
.then(() => {
return tab.memory.forceCycleCollection()