硒打开目标URL与多个空白页并行

时间:2019-07-25 14:34:56

标签: selenium-webdriver

在这个简单的单元测试中,我试图打开一些URL,但是Selenium并行打开了3个空白页面

import { Builder } from 'selenium-webdriver';

describe.only('cashpad', () => {
  it('open mail', async () => {
    const driver = await new Builder().forBrowser('chrome').build();

    try {
      await driver.get('https://www.mail.com/int/');
      await driver.sleep(5000);
    } catch(err) {
      console.log(err);

    } finally {
      await driver.quit();
    }
  });
});

here is screenshot

0 个答案:

没有答案