testcafe-react-selectors
testcafe-react-selectors copied to clipboard
[browserstack+testcafe+IE11] testcafe-react-selectors not working in IE11 browser
hi @kirovboris,
testcafe react selectors are not working in IE11 browser with Windows 7/8.1/10.
I'm using "testcafe-browser-provider-browserstack": "1.12.0" "testcafe": "1.8.5" "testcafe-react-selectors": "4.0.0"
My test code:
fixture('react selector test in IE11')
.meta({ feature: 'react selector test in IE11' })
.page('https://www.surveymonkey.com/apps')
.beforeEach(async function() {
console.log('in before each');
await waitForReact(20000);
});
test(
'Check for consumer context',
async t => {
console.log('in test');
const appDirectoryBasePage = ReactSelector('AppDirectoryBasePage');
await t.expect(appDirectoryBasePage.exists).ok();
}
);
no matter, how much I increase the timeout to (even 2 minutes), ends up in the same error Error:
`1) An error occurred in Selector code:
TypeError: Unable to get property 'length' of undefined or null reference
Browser: Internet Explorer 11.0 / Windows 10
(https://automate.browserstack.com/builds/9a3c23fd6973c5f754ff276dfab9c4a7bf0475ff/sessions/d5854dea9b6ea42b34527ecdbb316694fe170844)
71 | test(
72 | 'Check for consumer context',
73 | async t => {
74 | console.log('in test');
75 | const appDirectoryBasePage = ReactSelector('AppDirectoryBasePage');
> 76 | await t.expect(appDirectoryBasePage.exists).ok();
77 | }
78 | );`
Thank you for your input. I was able to reproduce the issue in IE11 even without browserstack.
I found that the target site contains a JS error in IE11. However, I cannot say precisely whether this client error leads to the incorrect behavior. Could you please try to reproduce the issue in a basic react project?
@AlexKamaev , I will try and reproduce this in a basic react project and get back to you we are seeing the same issue with Edge 18 browser as well
Hi @AlexKamaev
I was able to reproduce this issue in airbnb site in IE11.
Below is the test code
fixture(
test react testcafe selectors in IE11/Edge18) .meta({ feature: 'test react testcafe selectors' }) .page(
https://www.airbnb.com/) .beforeEach(async (t) => { await waitForReact(); }); test ( 'test react testcafe selectors in IE11/Edge18', async t => { console.log(
test name: ${t.testRun.test.name}); const experiences = ReactSelector('s').withProps({ id:"search-block-tab-true-EXPERIENCES" }); await t.click(experiences); await t.expect(experiences.exists).ok(); } );
stack trace: ` 1) An error occurred in Selector code:
TypeError: Unable to get property 'length' of undefined or null reference
Browser: Internet Explorer 11.0 / Windows 10
Screenshot: /Users/saipradeepcs/code/smweb/automation/screenshots/2020-06-01_10-21-58/test-1/Internet_Explorer_11.0_Windows_10/errors/1.png
69 | async t => {
70 | console.log(`test name: ${t.testRun.test.name}`);
71 | const experiences = ReactSelector('s').withProps({
72 | id:"search-block-tab-true-EXPERIENCES"
73 | });
> 74 | await t.click(experiences);
75 | await t.wait(10000);
76 | await t.expect(experiences.exists).ok();
77 | }
78 |);`
I've successfully reproduced this issue with your example. We'll research it and will let you know our results as soon as we have any. Please bear with us.
Thanks @SergeyShurygin
Hello, FYI I fixed this in this PR but I did not have time to add tests and I do not know if I will have time. 👋
This issue has been automatically marked as stale because it has not had any activity for a long period. It will be closed and archived if no further activity occurs. However, we may return to this issue in the future. If it still affects you or you have any additional information regarding it, please leave a comment and we will keep it open.
We're closing this issue after a prolonged period of inactivity. If it still affects you, please add a comment to this issue with up-to-date information. Thank you.