0

This is React project. React-google-login module is installed in the project. I am writing an autotest - I go to the project page, click on the element. The test fulfills, there are no errors. But with a manual click, a Google window opens in which you can select your mail. In autotest, this does not work. Tell me how can this be done?

html:

<button type="primary" class="login-form-button" >Login</button>

test.js:

try {
    await driver.get("test.com");

    await driver.wait(until.elementLocated(By.xpath(`//*[@id="root"]/button`)), 10000)
                .click();
    console.log('Click on the button')
  } catch (e) {
    console.log(e)

  } finally {
    console.log("Done",)
  }
  • 1
    https://stackoverflow.com/questions/28788106/switching-to-new-window-with-selenium-protractor-javascript – Infern0 Apr 29 '20 at 13:10
  • @Infern0, thnx, your link is great. But I don't open this window clicking on the button. I can open this window only manual. How can I must open second window clicking on the button? – Александр Apr 29 '20 at 13:49

0 Answers0