Protractor Button Click and open page in new tab

后端 未结 5 807
我在风中等你
我在风中等你 2021-02-08 02:21

I am fairly new to Protractor. I am trying to automate a scenario where I click on a button and its opens up a page in new tab and then we need to populate form in new page and

5条回答
  •  逝去的感伤
    2021-02-08 03:07

    There is another more convenient way. Just make use of the functions on the browser object.

    element(by.id("newPlan")).click();
    browser.sleep(10000);
    browser.waitForAngular();
    expect(browser.getCurrentUrl()).toMatch(/\/url/)
    

提交回复
热议问题