Element -//------>Sign In
Testcafe code -Selector('button').withText('Sign In')
The above line fails to identify the element
Hello,
The withText selector checks whether innerText of the provided element contains the defines string. Note that selectors are case sensitive and "button" and thus "Button" strings are different.So, to make sure that your selector is defined properly, call the following code in your browser console:
document.querySelector('button').innerText
You can also debug your app to check the defined selector as described in the following help topic:
My test fails because TestCafe could not find the required webpage element. Why does this happen?
Thanks.