protractor icon indicating copy to clipboard operation
protractor copied to clipboard

getPageTimeout is not working. "protractor": "5.4.2"

Open amodmahajan2016 opened this issue 7 years ago • 7 comments

getPageTimeout is waiting time for page to be loaded. Default wait time in 10 sec. I tried to change it to 1 second just for checking its functionality. I am expecting to give Error: Timed out waiting for page to load after 1000ms but it didn't. Conf file:

exports.config = {
  
    specs: ['../Spec Files/DropdownHandling.js'],

    getPageTimeout: 1000,

  
}

Spec file:

describe('Handling dropdown', () => {
    it('Verify options', () => {
        browser.get("https://www.mobikwik.com/");
        element(by.model('operator')).click();
});

    

});

Even I tried by passing it to get(url, time) as well. But it didn't work.

Is it something like we can not set less than default page load time out

Looking forward for the help.

amodmahajan2016 avatar Mar 18 '19 18:03 amodmahajan2016

Even i have the same issue it is not picking the elements and entering the data in to them.Could anyone please look in to this and give us the solution for this.

AyeshaBegam avatar Mar 20 '19 05:03 AyeshaBegam

What's the error ? Share the HTML element. Is the page angular ?

ashishbansali avatar Mar 20 '19 06:03 ashishbansali

Yes the page is angular and it is a mobile application. Error is: Failed: script timeout: result was not received in 11 seconds. It is not entering the data in elements.It used to work earlier. I have upgraded protractor to Version 5.4.2

 Login to application should login with Credentials given
  Message:
    Failed: script timeout: result was not received in 11 seconds
      (Session info: chrome=72.0.3626.121)
      (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17134 x86_64)
  Stack:
    ScriptTimeoutError: script timeout: result was not received in 11 seconds
      (Session info: chrome=72.0.3626.121)
      (Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 10.0.17134 x86_64)

AyeshaBegam avatar Mar 20 '19 06:03 AyeshaBegam

ayeshaBegam- your issue is different. You need to increase timeout for angular loading. Refer timeouta section of projtractor official page.

amodmahajan2016 avatar Mar 20 '19 19:03 amodmahajan2016

Hi amod, Did that as well. Increased the timeout value but still has the same problem.

On Thu, Mar 21, 2019, 1:08 AM amodmahajan2016 [email protected] wrote:

ayeshaBegam- your issue is different. You need to increase timeout for angular loading. Refer timeouta section of projtractor official page.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/angular/protractor/issues/5178#issuecomment-474997543, or mute the thread https://github.com/notifications/unsubscribe-auth/Al22BKBVXxPhEjWrh7CnF9AHBTsjNOvuks5vYo5DgaJpZM4b6hih .

AyeshaBegam avatar Mar 21 '19 04:03 AyeshaBegam

When logging in, is this an Angular page? Did you navigate to a non-angular page? Also browser.get only does a wait for the url to change. https://github.com/angular/protractor/blob/master/lib/browser.ts#L747

cnishina avatar Mar 30 '19 01:03 cnishina

@AyeshaBegam was this issue ever resolved? I believe I'm also running into this.

Nossarian avatar Sep 25 '19 16:09 Nossarian