Hey ,

Hmmm , I'm already using a waitFor closure in the method , which should 
result in the same behaviour as using the wait option in content block. 
Anyway when I apply the wait option and remove the waitFor in the method , 
I get the same error. 

---------------------------------------

dashboardListSaveButton { $('[data-gtm="content-planner/filters/save"]')}

def "save dashboard list"() {
   waitFor {
      dashboardListSaveButton
   }
}

---------------------------------------

VS

---------------------------------------

 dashboardListSaveButton(wait: true) { 
$('[data-gtm="content-planner/filters/save"]')}

def "save dashboard list"() {
      dashboardListSaveButton
}

---------------------------------------


thx

On Wednesday, 18 December 2019 11:27:50 UTC+1, micha.kutz wrote:
>
> Hey Nico,
>
> the difference is the `waitFor` in the method. You can achieve the same 
> behavior in the content block by adding a `wait: true` like this:
>
> static content = {
>     ...
>     dashboardListSaveButton(wait: true) { 
> $('[data-gtm="content-planner/filters/save"]')}
>     ...
> }
>
> See https://gebish.org/manual/current/#content-dsl-wait
>
> Kind regards
>
> Nico Janssens <[email protected] <javascript:>> schrieb am Mi., 18. 
> Dez. 2019, 11:08:
>
>> Hi, 
>>
>> A question about content closure.
>>
>> In the content closure of a page object , I have defined some elements :
>>
>> static content = {
>>    ....
>>           dashboardListSaveButton { $(
>> '[data-gtm="content-planner/filters/save"]')}
>>    ...
>> }
>>
>>
>> In that same page object , I have a method like 
>>
>> def "save dashboard list"() {
>>    waitFor {
>>       dashboardListSaveButton.click()
>>    }
>> }
>>
>>
>> When running the test ( via spock framework) which makes use of the 
>> method above, I always get following exception 
>> : ElementClickInterceptedException: element click intercepted: Element is 
>> not clickable at point (924, 913)
>>
>> When I modify the method like this 
>>
>> def "save dashboard list"() {
>>    waitFor {
>>       $('[data-gtm="content-planner/filters/save"]').click()
>>    }
>> }
>>
>> and rerun the test, it works fine. 
>>
>>
>> Is there any difference defining the element in the content closure or 
>> using the navigator directly in the method?
>>
>> thx
>>
>>
>> Kind regards
>>
>> Nico
>>
>>
>>
>>
>>
>>
>>
>> -- 
>> 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] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/geb-user/6d2f7006-b5f5-47bb-bd7d-9d4a66dab8dd%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/geb-user/6d2f7006-b5f5-47bb-bd7d-9d4a66dab8dd%40googlegroups.com?utm_medium=email&utm_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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/geb-user/581f4240-f58e-41d4-aced-74426616db39%40googlegroups.com.

Reply via email to