Re: [geb-user] Strange behavior for element

2020-12-08 Thread thokari
Often times, certain elements only appear on the page after some 
Javascript has run.
At the point of time when you check manually, the element is already 
available, but the automated test might be too fast.


Try this:
otherInsuranceAmount(wait: true) { $('[id$=otheramount]') }

Am 08.12.2020 16:16 schrieb Ben Frey:

I have an element on a page that's defined like this:

otherInsuranceAmount { $('[id$=otheramount]') }

When I debug my test and put a breakpoint at the "at MyPage" line, I
get a MissingPropertyException when I try to inspect
otherInsuranceAmount via the debugger. However, the expression
$('[id$=otheramount]') resolves just fine. What could cause this to
happen, and how do I fix it?

 --
 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+unsubscr...@googlegroups.com.
 To view this discussion on the web visit
https://groups.google.com/d/msgid/geb-user/41b1a9f1-b402-485f-9f97-da5e7463cbfcn%40googlegroups.com
[1].


Links:
--
[1]
https://groups.google.com/d/msgid/geb-user/41b1a9f1-b402-485f-9f97-da5e7463cbfcn%40googlegroups.com?utm_medium=email_source=footer


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/026849f88c939c006b43f38dceca8970%40posteo.de.


Re: [geb-user] How to quit between parameterized tests

2020-12-08 Thread Marcin Erdmann
You can also configure Geb to do clear web storage automatically for you
between tests:
https://gebish.org/manual/3.4.1/#auto-clearing-web-storage-configuration

On Mon, Dec 7, 2020 at 7:40 PM Ben Frey  wrote:

> Great, looks like clearWebStorage() does what I need. Thanks!
>
> On Monday, December 7, 2020 at 2:19:27 PM UTC-5 thok...@gmail.com wrote:
>
>> Hello Ben,
>>
>> this section in the manual explains how to do this:
>> https://gebish.org/manual/3.4.1/#driver-management
>>
>> Cheers,
>> Thomas
>>
>> Am 07.12.2020 20:07 schrieb Ben Frey:
>> > I'm using Spock as my testing framework. Everything works fine if I
>> > comment out all but one row of my where table, but if I try to run
>> > more than one test in sequence, the second one fails. Initially, it
>> > looked like the browser session was staying open, so I added a
>> > cleanup: block with browser.quit(), but now the second run fails
>> > immediately saying "Session ID is null. Using WebDriver after calling
>> > quit()?". I've also tried clearing cookies, but the user is still
>> > logged in. How can I properly close the browser or at least the window
>> > between tests so I know that I'll start from a fresh slate each test?
>> >
>> > --
>> > 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+u...@googlegroups.com.
>> > To view this discussion on the web visit
>> >
>> https://groups.google.com/d/msgid/geb-user/3579243f-c58f-4032-8d4d-4b34dc8a4e78n%40googlegroups.com
>> > [1].
>> >
>> >
>> > Links:
>> > --
>> > [1]
>> >
>> https://groups.google.com/d/msgid/geb-user/3579243f-c58f-4032-8d4d-4b34dc8a4e78n%40googlegroups.com?utm_medium=email_source=footer
>>
> --
> 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+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/geb-user/9354b857-dd67-4c60-97ea-7bc564e4847an%40googlegroups.com
> 
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/CA%2B52dQR1ia0yGqc1nj6pSy9N6KHZKXxsEP3WAQiPax9-s9n-FQ%40mail.gmail.com.