You put it in GebConfig when creating the driver. It's not
*driver.capabilities.
*it's just capabilities but you have to create a DesiredCapabilities object
to use it. DesiredCapabilities capabilities = new DesiredCapabilities().
You should be able to google this as it's not specific to Geb.
On Thursday, October 10, 2019 at 12:08:15 PM UTC-5, Ben Frey wrote:
>
> Ok, I'll try that. Where do I put the
> *driver.capabilities.setCapability("pageLoadStrategy",
> "none")* line? I tried in both GebConfig.groovy, in the page's class
> definition, and in my login trait, but it doesn't seem to have an effect.
>
> On Thursday, October 10, 2019 at 11:54:35 AM UTC-5, jc wrote:
>>
>> The default for atCheckWaiting is false so that is why you didn't see a
>> difference. My guess is the pageLoadStrategy is going to be your only
>> solution,
>>
>> On Thursday, October 10, 2019 at 11:48:36 AM UTC-5, Ben Frey wrote:
>>>
>>> Well, setting atCheckWaiting=false for that page didn't help. Since it's
>>> just a "nice-to-have", I'll leave it be for now.
>>>
>>> On Thursday, October 10, 2019 at 11:39:57 AM UTC-5, jc wrote:
>>>>
>>>> For atCheckWaiting:
>>>> https://gebish.org/manual/current/#page-level-at-check-waiting
>>>>
>>>> As for pageLoadStrategy this is set by the driver and not Geb, so I do
>>>> not believe that is possible. You could maybe try to play around with
>>>> that
>>>> page launching it's own instance of the driver with that capability but
>>>> I'm
>>>> not entirely sure about that.
>>>>
>>>> On Thursday, October 10, 2019 at 11:16:29 AM UTC-5, Ben Frey wrote:
>>>>>
>>>>> I don't have *atCheckWaiting *set at all, so it's whatever the
>>>>> default is (can't find what it is in the documentation). The only thing
>>>>> in
>>>>> the at block is a title check, and I see the title long before Geb
>>>>> decides
>>>>> to continue navigation. The *pageLoadStrategy* sounds promising, but
>>>>> is there a way to set it only for a given page?
>>>>>
>>>>> On Thursday, October 10, 2019 at 11:07:43 AM UTC-5, jc wrote:
>>>>>>
>>>>>> This could be a couple things. Do you have *atCheckWaiting *set to
>>>>>> true in GebConfig? If so, it will wait for everything in your pages
>>>>>> *static
>>>>>> at {}* block. The other thing could be the driver's page load
>>>>>> strategy. I know Chrome and Firefox drivers you can set different
>>>>>> levels
>>>>>> of page load strategy with capabilities. For example, my firefox driver
>>>>>> uses
>>>>>> capabilities.setCapability("pageLoadStrategy","eager")
>>>>>>
>>>>>>
>>>>>> *pageLoadStrategy* supports the following values :
>>>>>>
>>>>>> 1.
>>>>>>
>>>>>> *normal*
>>>>>>
>>>>>> This stategy causes Selenium to wait for the full page loading
>>>>>> (html content and subresources downloaded and parsed).
>>>>>> 2.
>>>>>>
>>>>>> *eager*
>>>>>>
>>>>>> This stategy causes Selenium to wait for the DOMContentLoaded
>>>>>> event (html content downloaded and parsed only).
>>>>>> 3.
>>>>>>
>>>>>> *none*
>>>>>>
>>>>>> This strategy causes Selenium to return immediately after the
>>>>>> initial page content is fully received
>>>>>>
>>>>>> Be careful when you change this though as you can introduce a lot of
>>>>>> timing errors.
>>>>>>
>>>>>> On Thursday, October 10, 2019 at 10:49:06 AM UTC-5, Ben Frey wrote:
>>>>>>>
>>>>>>> I have a logon script that goes to the login page, enters the user's
>>>>>>> credentials, then once we hit the member home page, I want to navigate
>>>>>>> to a
>>>>>>> specific URL. This works fine, but Geb is waiting for *all *of the
>>>>>>> content on the home page to load before it navigates away, which is
>>>>>>> unnecessary. Is there a way to tell Geb "once you're at HomePage,
>>>>>>> immediately navigate to TargetPage"?
>>>>>>>
>>>>>>
--
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/db51ffdd-2969-4369-9ba4-094295286334%40googlegroups.com.