Re: [geb-user] Re: "element not interactable" after at-checker

2020-08-26 Thread Ben Frey
I did try scrolling, but it didn't help the problem. I've tried watching 
closely when the error occurs, and it doesn't seem like the page is fully 
loaded, even though I have min: 6, wait: true on the content.
On Wednesday, August 26, 2020 at 7:40:14 AM UTC-5 thok...@gmail.com wrote:

> I know for sure I had this case very recently, where the "element not 
> interactable" error occured, and the element was outside the viewport, 
> and it also didn't scroll automatically to that element.
> I remember this clearly, because I could not figure out the problem, 
> until I actually found an answer on stackoverflow (not the first answer 
> to that question, though), that suggested to watch out for scrolling.
> It was only because of this that I realised that the element was in fact 
> outside the viewport, and explicit scrolling made the problem go away.
> The application that I am testing is very old, close to 20 year, and 
> there are many problems with the UI, like buttons and UI elements 
> visibly changing after the page has loaded, so it could definitely be 
> some weird edge case.
>
> I definitely agree to Marcin, that this is by no means a common 
> occurrence, and most of the time, the element is in fact not 
> interactable, i.e. disabled, when this error comes.
>
> Am 26.08.2020 10:36 schrieb Marcin Erdmann:
> >> Selenium incorrectly reported "element not interactable" when the
> > problem was in fact that the elemnt was merely outside the viewport.
> > If the element is close to, or beyond, the edge of the screen, try
> > scrolling before interacting with it.
> > 
> > This is not what matches my personal experience. I've never
> > experienced ElementNotInteractableException for an element that was
> > outside of viewport - Selenium pretty much always scrolls the viewport
> > so that element is visible before clicking it and when it fails to do
> > that because there are floating elements on the page you would get
> > something along the lines of "org.openqa.selenium.WebDriverException:
> > Element is not clickable at point (x, y). Other element would receive
> > the click". From my experience ElementNotInteractableException is
> > thrown when the element is not displayed at all (it is hidden via CSS)
> > or it's disabled/read only.
> > 
> > On Mon, Aug 24, 2020 at 10:16 PM Ben Frey 
> > wrote:
> > 
> >> Ahh, I hadn't thought about the viewport. I'll play with that and
> >> see how it goes. I also added min properties to the radioButtons
> >> navigator object, and that seems like it may have helped.
> >> 
> >> On Monday, August 24, 2020 at 3:54:41 PM UTC-5 thok...@gmail.com
> >> wrote:
> >> Hi Ben,
> >> 
> >> this is difficult to answer correctly without more information.
> >> Generally, I would try to narrow down the conditions, or the
> >> selector respectively, as much as possible.
> >> One explanation could be that you are still looking at the wrong
> >> button, after all you seem to be having more than one, and narrowing
> >> it down to the correct one seems to be problematic.
> >> 
> >> I just recently had the problem that Selenium incorrectly reported
> >> "element not interactable" when the problem was in fact that the
> >> elemnt was merely outside the viewport. If the element is close to,
> >> or beyond, the edge of the screen, try scrolling before interacting
> >> with it.
> >> 
> >> Thomas
> >> 
> >> Ben Frey schrieb am Montag, 24. August 2020 um 20:05:14 UTC+2:
> >> I'm having a devil of a time with one particular page being very
> >> flaky. I've set atCheckWaiting = true globally. In the page's
> >> at-checker I verify that there there's at least one radio button
> >> (e.g. radioButtons.size() > 0). In the script, I have some
> >> conditional logic that also has a waitFor that depends on the same
> >> condition, but immediately after that, if I try to interact with
> >> radioButtons, I get the "element not interactable" message from
> >> Selenium. What's going on here? The content should be there since
> >> the at-checker passed.
> > 
> > --
> > 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/08ae974a-ecc5-440a-b246-10e2703f4e70n%40googlegroups.com
> > [1].
> > 
> > --
> > 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/CA%2B52dQR4LgiqYiw3JY_4Civ4k%3DqfLVM9agCjZwcnwj88bk6N9w%40mail.gmail.com
> > [2].
> > 
> > 
> > Links:
> > --
> > [1]
> > 
> 

Re: [geb-user] Re: "element not interactable" after at-checker

2020-08-26 Thread thokari
I know for sure I had this case very recently, where the "element not 
interactable" error occured, and the element was outside the viewport, 
and it also didn't scroll automatically to that element.
I remember this clearly, because I could not figure out the problem, 
until I actually found an answer on stackoverflow (not the first answer 
to that question, though), that suggested to watch out for scrolling.
It was only because of this that I realised that the element was in fact 
outside the viewport, and explicit scrolling made the problem go away.
The application that I am testing is very old, close to 20 year, and 
there are many problems with the UI, like buttons and UI elements 
visibly changing after the page has loaded, so it could definitely be 
some weird edge case.


I definitely agree to Marcin, that this is by no means a common 
occurrence, and most of the time, the element is in fact not 
interactable, i.e. disabled, when this error comes.


Am 26.08.2020 10:36 schrieb Marcin Erdmann:

Selenium incorrectly reported "element not interactable" when the

problem was in fact that the elemnt was merely outside the viewport.
If the element is close to, or beyond, the edge of the screen, try
scrolling before interacting with it.

This is not what matches my personal experience. I've never
experienced ElementNotInteractableException for an element that was
outside of viewport - Selenium pretty much always scrolls the viewport
so that element is visible before clicking it and when it fails to do
that because there are floating elements on the page you would get
something along the lines of "org.openqa.selenium.WebDriverException:
Element is not clickable at point (x, y). Other element would receive
the click". From my experience ElementNotInteractableException is
thrown when the element is not displayed at all (it is hidden via CSS)
or it's disabled/read only.

On Mon, Aug 24, 2020 at 10:16 PM Ben Frey 
wrote:


Ahh, I hadn't thought about the viewport. I'll play with that and
see how it goes. I also added min properties to the radioButtons
navigator object, and that seems like it may have helped.

On Monday, August 24, 2020 at 3:54:41 PM UTC-5 thok...@gmail.com
wrote:
Hi Ben,

this is difficult to answer correctly without more information.
Generally, I would try to narrow down the conditions, or the
selector respectively, as much as possible.
One explanation could be that you are still looking at the wrong
button, after all you seem to be having more than one, and narrowing
it down to the correct one seems to be problematic.

I just recently had the problem that Selenium incorrectly reported
"element not interactable" when the problem was in fact that the
elemnt was merely outside the viewport. If the element is close to,
or beyond, the edge of the screen, try scrolling before interacting
with it.

Thomas

Ben Frey schrieb am Montag, 24. August 2020 um 20:05:14 UTC+2:
I'm having a devil of a time with one particular page being very
flaky. I've set atCheckWaiting = true globally. In the page's
at-checker I verify that there there's at least one radio button
(e.g. radioButtons.size() > 0). In the script, I have some
conditional logic that also has a waitFor that depends on the same
condition, but immediately after that, if I try to interact with
radioButtons, I get the "element not interactable" message from
Selenium. What's going on here? The content should be there since
the at-checker passed.


 --
 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/08ae974a-ecc5-440a-b246-10e2703f4e70n%40googlegroups.com
[1].

 --
 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%2B52dQR4LgiqYiw3JY_4Civ4k%3DqfLVM9agCjZwcnwj88bk6N9w%40mail.gmail.com
[2].


Links:
--
[1]
https://groups.google.com/d/msgid/geb-user/08ae974a-ecc5-440a-b246-10e2703f4e70n%40googlegroups.com?utm_medium=emailutm_source=footer
[2]
https://groups.google.com/d/msgid/geb-user/CA%2B52dQR4LgiqYiw3JY_4Civ4k%3DqfLVM9agCjZwcnwj88bk6N9w%40mail.gmail.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/581b0732a0eac7bb1073dc634b868ae6%40posteo.de.


Re: [geb-user] Chrome Issue

2020-08-26 Thread Marcin Erdmann
Is this the whole stacktrace? There usually would be a "caused by" section
below this showing power assertion output of evaluation of the condition
within the closure passed to waitFor which I'm after

On Wed, Aug 26, 2020 at 12:33 AM raza  wrote:

> geb.waiting.WaitTimeoutException: condition did not pass in 30 seconds
> at geb.waiting.Wait.waitFor(Wait.groovy:124)
> at geb.waiting.Wait$waitFor.call(Unknown Source)
> at
> geb.waiting.DefaultWaitingSupport.doWaitFor(DefaultWaitingSupport.groovy:50)
> at
> geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy:41)
> at
> geb.waiting.DefaultWaitingSupport.waitFor(DefaultWaitingSupport.groovy)
> at geb.waiting.WaitingSupport$waitFor.call(Unknown Source)
> at geb.Page.waitFor(Page.groovy:116)
> at
> geb.binding.BindingUpdater$InvocationForwarding.doCall(BindingUpdater.groovy:136)
> at
> step_definitions.Script4$_run_closure9.doCall(Script4.groovy:283)
> at ✽.I complete Eligibility
> Check(classpath:/home/TestAutomation/target/test-classes/features/Care.feature:9)
>
> On Wed, 26 Aug 2020 at 02:43, Marcin Erdmann 
> wrote:
>
>> What's the stacktrace of the exception?
>>
>> On Mon, Aug 24, 2020 at 10:21 PM raz  wrote:
>>
>>> I have this Salesforce lightning site which is working fine with Firefox
>>> but when I run the same test in Chrome, it's like it can't ready anything
>>> from DOM and just waits at the first instruction.
>>>
>>> For example, when a page loads, I have this code to ensure its loaded
>>> before interacting with the objects which works flawlessly on Firefox and
>>> in Edge.
>>>
>>> *waitFor(WAIT_TIME) { browser.$('h2', text: contains('Eligibility
>>> Check')).isDisplayed() }*
>>>
>>> but the same line of code throws *geb.waiting.WaitTimeoutException:
>>> condition did not pass in 30 seconds *when I run the test in Chrome and
>>> I can see the page is loaded but seems like Geb/Selenium can't interact
>>> with the DOM hence the exception.
>>>
>>> Any ideas what may be going on? I've tried various machines, versions of
>>> Chrome but can;t seem to figure it out. Any help is greatly appreciated.
>>>
>>> --
>>> 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/e9c3cc81-156c-45e0-a3bb-ebb6f888d76bn%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Geb User Mailing List" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/geb-user/IGedAOfoFNk/unsubscribe.
>> To unsubscribe from this group and all its topics, 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%2B52dQS6WXtTRg2cf-0RAYjX5mqPKopK-Ad7wPwQexu5O3BuhA%40mail.gmail.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/CAFH7xtrYOEkyREeT4cKUoowe1J%2BDQuV5AJ0pK-tgiBoo7eJfWg%40mail.gmail.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%2B52dQS6kE7MCLMtNXTwhoWTP7dkBMysiMcwLNZfgvQZ_YsH7Q%40mail.gmail.com.


Re: [geb-user] Re: "element not interactable" after at-checker

2020-08-26 Thread Marcin Erdmann
> Selenium incorrectly reported "element not interactable" when the problem
was in fact that the elemnt was merely outside the viewport. If the element
is close to, or beyond, the edge of the screen, try scrolling before
interacting with it.

This is not what matches my personal experience. I've never experienced
ElementNotInteractableException for an element that was outside of viewport
- Selenium pretty much always scrolls the viewport so that element is
visible before clicking it and when it fails to do that because there are
floating elements on the page you would get something along the lines of
"org.openqa.selenium.WebDriverException: Element is not clickable at point
(x, y). Other element would receive the click". From my
experience ElementNotInteractableException is thrown when the element is
not displayed at all (it is hidden via CSS) or it's disabled/read only.

On Mon, Aug 24, 2020 at 10:16 PM Ben Frey  wrote:

> Ahh, I hadn't thought about the viewport. I'll play with that and see how
> it goes. I also added min properties to the radioButtons navigator object,
> and that seems like it may have helped.
>
> On Monday, August 24, 2020 at 3:54:41 PM UTC-5 thok...@gmail.com wrote:
>
>> Hi Ben,
>>
>> this is difficult to answer correctly without more information.
>> Generally, I would try to narrow down the conditions, or the selector
>> respectively, as much as possible.
>> One explanation could be that you are still looking at the wrong button,
>> after all you seem to be having more than one, and narrowing it down to the
>> correct one seems to be problematic.
>>
>> I just recently had the problem that Selenium incorrectly reported
>> "element not interactable" when the problem was in fact that the elemnt was
>> merely outside the viewport. If the element is close to, or beyond, the
>> edge of the screen, try scrolling before interacting with it.
>>
>> Thomas
>> Ben Frey schrieb am Montag, 24. August 2020 um 20:05:14 UTC+2:
>>
>>> I'm having a devil of a time with one particular page being very flaky.
>>> I've set atCheckWaiting = true globally. In the page's at-checker I
>>> verify that there there's at least one radio button (e.g. 
>>> radioButtons.size()
>>> > 0). In the script, I have some conditional logic that also has a
>>> waitFor that depends on the same condition, but immediately after that, if
>>> I try to interact with radioButtons, I get  the "element not interactable"
>>> message from Selenium. What's going on here? The content should be there
>>> since the at-checker passed.
>>>
>> --
> 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/08ae974a-ecc5-440a-b246-10e2703f4e70n%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%2B52dQR4LgiqYiw3JY_4Civ4k%3DqfLVM9agCjZwcnwj88bk6N9w%40mail.gmail.com.