Taiko: Issue goto on single page application

Created on 31 Jul 2019  路  9Comments  路  Source: getgauge/taiko

Expected behavior

I open

Actual behavior

goto should be fine with every request.

Steps to reproduce

goto("https://earth.nullschool.net/zh-cn/#2019/05/01/0600Z/wind/surface/level/overlay=temp/orthographic=-247.49,35.34,1092/loc=114.340,30.651")

works fine, but, after the first goto

goto("https://earth.nullschool.net/zh-cn/#2019/05/02/0600Z/wind/surface/level/overlay=temp/orthographic=-247.49,35.34,1092/loc=114.340,30.651")

The command line stuck and keeps waiting.

Versions

taiko 1.0.0 (76.0.3803.0)
node v10.8.0
macOS

bug

Most helpful comment

Hi will take up this issue

All 9 comments

@rsun-thoughtworks I have tried with the same taiko version but not able to reproduce it. At first go its woking as excepted. Kindly find the below screenshot:
Screen Shot 2019-07-31 at 11 05 11 AM

Could you please upgrade your taiko version (npm install taiko -g) and let us know whether you are facing same issue.

@rsun-thoughtworks I have tried with the same taiko version but not able to reproduce it. At first go its woking as excepted. Kindly find the below screenshot:
Screen Shot 2019-07-31 at 11 05 11 AM

Could you please upgrade your taiko version (npm install taiko -g) and let us know whether you are facing same issue.

Hi, According to my description, we have two steps to reproduce it:

goto("https://earth.nullschool.net/zh-cn/#2019/05/01/0600Z/wind/surface/level/overlay=temp/orthographic=-247.49,35.34,1092/loc=114.340,30.651")

goto("https://earth.nullschool.net/zh-cn/#2019/05/02/0600Z/wind/surface/level/overlay=temp/orthographic=-247.49,35.34,1092/loc=114.340,30.651")

According to your screen, you only call goto once.

You may reproduce what I have by run the gotos I provide, Thanks!

@rsun-thoughtworks Able to reproduce it. Thanks for pointing it out.
We will look into this.
updated screenshot:
Screen Shot 2019-07-31 at 11 21 11 AM

Hi will take up this issue

Observations made
https://github.com/getgauge/taiko/blob/5ada00f72c218606b9681f18966987ac606bcaba/lib/handlers/pageHandler.js#L136

page.navigate is not emitting
https://github.com/getgauge/taiko/blob/5ada00f72c218606b9681f18966987ac606bcaba/lib/handlers/pageHandler.js#L131-L133

Tried directly in chrome-remote-interface, and filed an issue
https://github.com/cyrus-and/chrome-remote-interface/issues/399

They mentioned that this is an issue in Chromium
https://chromium-review.googlesource.com/c/chromium/src/+/999115/

@NivedhaSenthil @Debashis9012 I'm new to chrome-dev-tools, will try the fix they proposed and run the e2e. However not sure if this fix might affect existing code. Any comments?

Fix looks fine given the design of CDP, can be updated in doActionAwaitingNavigation where we wait for loadEventFired for navigation apis.

Seems to be the case for any within page navigation, following will also fail

goto("https://github.com/getgauge/taiko#whats-taiko")
goto("https://github.com/getgauge/taiko#whats-taiko")

Raised a PR for this @NivedhaSenthil

This issue has been verified and found fixed.
Tested version: ef43f50bfcd74ac6512454789151a726adc2b8b7

@Debashis9012 Hi, do you know when we will release next version that fixes this issue?

Was this page helpful?
0 / 5 - 0 ratings