Currently, I am working on developing an application that involves a series of page navigations for users to complete information. To facilitate navigation to specific parts of the page, I attempted to create a generic step definition as a "background" step to cover all precondition steps.
Background:
Given I am on Page 10 of the application
Given(/^I am on a specific Page$/,function(){
//Implementation from Page 1 to Page 9
})
Each individual page has its own unique step definitions and page object functions. However, when it comes to Page 10, I tried to include all page object functions but encountered an issue with a "function timed out" error message.
Is there a solution to address this problem?
timeout: 300000, // <number> timeout for step definitions
In an attempt to resolve the issue, I adjusted the timeout parameter in my wdio.conf.js file from 20000 to 300000. However, this approach seems inefficient as it requires increasing the timeout further as the page navigation expands. Additionally, prolonged waiting periods for lightweight steps to throw error messages do not seem optimal.
If possible, could you provide guidance on the best way to resolve this issue?
PS: I believe the issue is self-explanatory, hence no code snippets have been included. Please let me know if more information is required.