Hi! 
I am a new user of GEB framework and already got used to work with 
'withNewWindow' method.

Scenario:
1. I am on the page 'A' pressing some link and automatically will be opened 
new Tab 'B' and I will be on tha tab 'B'
2. I am checking some elements on tab 'B' and also have to check 'Close' 
button on the page 'B'. 
We have such functionality in our system, after pressing 'Close' button - 
automatically will be closed tab 'B' and user will be on the tab 'A'

S, I have tried to use this code
       browser.withNewWindow({ $("someElement").click() }, wait: true) { 
//open new tab 'B'
            assert title == Some_Title

            //here checks for other elements on the page//

            closeButton.click // here I will get exception, because tab 'B' 
will be closed, but closure is still in progress
        }

But as I mentioned  in code - it will produce exception, because closure is 
still in progress but tab is already closed after pressing 'Close' button 
on the page.


How can I manage this? How do people work with such cases?

Of course, I can open new tab 'B' without Geb and this 'withNewWindow' 
method, take unique tab ID and after pressing 'Close' button - write assert 
that browser has not such tab ID. But I wanna use GEB.
Is it possible? 

-- 
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/8ccada33-b7d8-4c8a-a62d-5c3d4e0468b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to