Cross-posted to
SO:
https://stackoverflow.com/questions/49440479/withnewwindow-throws-nonewwindowexception-for-click-of-href-target-blank
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 [email protected].
To post to this group, send email to [email protected].
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.