-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
openBrowser
with observe
set, results in "Browser or page not initialized"
#2712
Comments
You can pass {headless:false} into openBrowser if you need to observe the test |
Actually, our use case was a bit different. We only wanted to have a specific time interval between each test step. Hence, we opened the browser with |
The observeTime option for setConfig sets the delay between each test step. So you would need to open the browser first, then call I think headless == true sets it to '0'. Otherwise make a pull request to fix the issue you're presenting. Taiko isn't actively maintained/fixing bugs. But they do accept pull requests for bug fixes from the community |
That's a bummer :/ |
Again, they accept Pull Requests. So if you have an issue, you can submit a solution via a pull request. They are usually pretty quick to review and merge them. |
Describe the bug
For exported functions interacting with the browser, there are some hooks in place that check each time before running these functions, if the observe mode is set, and if it is, to wait before actually running the function:
https://github.com/getgauge/taiko/blob/v1.3.10/lib/taiko.js#L2616-L2618
The first thing
waitFor
does, is to callvalidate
(https://github.com/getgauge/taiko/blob/v1.3.10/lib/taiko.js#L2340) and the first thingvalidate
does, is to check if there is a browser instance available (https://github.com/getgauge/taiko/blob/v1.3.10/lib/connection.js#L175-L177).Unfortunately, this hook is also executed for the
openBrowser
function. As the purpose of this function is to open a browser, the aforementioned check will inherently fail, as there is no browser instance availableTo Reproduce
Steps (or script) to reproduce the behavior:
observe
totrue
openBrowser()
Logs
Expected behavior
Error should not happen.
Versions:
The text was updated successfully, but these errors were encountered: