Open fbuetler opened 9 months ago
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 headless
and observe
set.
I know observe
is originally meant to observe the test with a visible browser. However, I think, openBrowser
should not fail in the case described above.
The observeTime option for setConfig sets the delay between each test step.
So you would need to open the browser first, then call await setConfig({observeTime: timeInMilliSeconds})
or npx taiko script.js -o -w 1500
(1500 being the observeTime in ms )
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
Taiko isn't actively maintained/fixing bugs
That's a bummer :/
https://github.com/getgauge/taiko/discussions/2707
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: