Hi I am currently working on an application that includes series of page navigation for an user to complete info. In order to navigate to a certain part of the page, I tried creating a generic step definition as a "background" step to cover all the precondition steps.
Background:
Given I am the Page10 of the application
Given(/^I am on a specific Page$/,function(){
//Implementation of Page 1 to Page 9
})
Every such page has its seperate step definition and page object functions .. And in this specfic page10 , I tried including all the page object functions. But unfortunately I am getting "function timed out, ensure the promise resolves within 100000 milliseconds"
Is there a way to fix this?
timeout: 300000, // <number> timeout for step definitions
As above, I set my wdio.conf.js timeout parameter as 20000 to 300000 , but have to keep increasing it more and more as the page navigation gets wider. Also, I feel this is not a right approach. As the light weight steps would then wait for a longer period to throw error messages
Please let me know the best way to fix this?
PS: As I reckon this issue self explanatory and hence no code added. Let me know if you need more information.
You can specify a specific timeout for your background step:
Given('your step', { timeout: 70000 }, function () {
// your code here
})
Please let me know if that's not the answer you were looking for.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.