Recently upgraded testing-stack:
- Selenium 3.11.0
- Gecko Driver 0.20.0
- Geb 2.1
I have an `index.html` with this link:
<div><a id="openNewChat" href="#" target="_blank">Open new chat</a></div>
Manual browsing with current Chrome or Firefox on MacOS, clicking this link opens a new tab containing the same page.
With this Geb code:
withNewWindow({ $('#openNewChat').click() }, close: false) {
$('#username').value('a')
$('#message').value('xxx')
$('#btnSend').click()
otherBrowser = getCurrentWindow()
}... Geb throws a NoNewWindowException every execution. If I change the target to target="otherBrowser", the exception is not thrown, and the test passes.
Is Geb/WebDriver/Gecko/Selenium doing something wrong here? I'm guessing that the answer is going to come back that this is a problem upstream of Geb, and that Geb is just seeing the driver report the same set of availableWindows before and after the click.
Brett
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/35ac97e3-f465-498e-b90c-f26453a29558%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Marcin, thanks for the reply.For 1 - it's a little hard to compare what worked with what did not, because I was trying to move the tests to another platform that was quite different to where the tests were working:Working: MacOS, geckoDriverVersion = 0.17.0 (macos), seleniumVersion = 3.4.0, gebVersion=1.1.1New Environment: Linux Ubuntu Trusty, headless on Travis, geckoDriverVersion = 0.20.0, seleniumclick target that opens the new windowVersion=3.11.0, gebVersion=2.1The tests as they were hard-coded the Gecko driver to MacOS ... having fixed that, the tests did not run well on Travis. In addition to the upgrades, I added a Selenium setHeadless(true) for the Firefox driver.For 2 - changing the target certainly seemed to work. With either "_blank" or "anythingelse" when clicking the link in a manual browser, a new tab opened fine. For some reason in headless/test-run mode it did not like the _blank. I'll see if I can come up with something different for the href="#", but since the link is just a JavaScript click target, I don't really see a problem with that link.For 3 - I can't set a breakpoint in Travis at the moment. I might try on a non-Travis Linux environment to do that. What I can say is that there are either 0 or >1 windows created based on the code - those are the only possibilities. Unfortunately I'm not getting the NoNewWindowException string message at the moment to clarify which it is, but I guess 0.Brett
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+u...@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/35ac97e3-f465-498e-b90c-f26453a29558%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Geb User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to geb-user+unsubscribe@googlegroups.com.
To post to this group, send email to geb-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/e7124810-9fb4-4004-80e7-a0ff1f3512d6%40googlegroups.com.