Reputation: 31
Issue: Clicking some anchor elements in a mobile device using Chrome's device emulator fails to navigate to target links.
Here I'm trying to test the behavior of switching the style of product cells from grid view to list view by clicking an icon which is an anchor tag with an href that contains the parameter "disp=list".
Right now clicking the icon does nothing, and the same behavior can be seen in click actions performed on other anchor elements in the navigation bar. Everything works as expected when I test manually in my chrome emulator and saucelabs but fails when I try with testcafe which shouldn't make a difference since it uses my locally installed browser.
page to test
Command:
testcafe "chrome:emulation:device=iphone X" path-to-file.js
Browser/OS: Chrome 75.0.3770 / Mac OS X 10.14.5
Here's the test:
fixture`[mobile] navigation`
.page('https://tw.bid.yahoo.com/search/auction/product?qt=product&kw=iphone&p=iphone')
test
('Clicking the view button should switch item cell view', async t => {
await t
.click(Selector('.ViewSwitchButton__viewButton___1r1Kh.MobileNavigation__menuButton___1OVvQ'))
.expect(getPageUrl()).contains('disp=list')
})
clicking the view style icon should update the page from grid view to list view with the url updated to https://tw.bid.yahoo.com/search/auction/product?disp=list&kw=iphone&p=iphone&refine=-prop_3%2C-prop_2
Upvotes: 3
Views: 269
Reputation: 2212
I've reproduced this behavior under "testcafe-hammerhead" proxy. Here is an issue you can track: https://github.com/DevExpress/testcafe-hammerhead/issues/2080.
The fix was included in TestCafe v1.6.0.
Upvotes: 1