You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Below code works fine even if there are changes in object properties
driver.findElement(By.id("username")).sendKeys("Simon");
driver.findElement(By.id("password")).sendKeys("secret");
driver.findElement(By.id("Sign in")).click();
However, below code fails for the same changes in object properties. Recheck-web does not work in case of xpath properties.
driver.findElement(By.xpath("//[@id="username"]")).sendKeys("Simon");
driver.findElement(By.xpath("/html/body/div/div/form/div[2]/input")).sendKeys("secret");
driver.findElement(By.xpath("//[test()='sign-in']")).click();
Changes made in object properties to replicate issue:
• Remove Id for username
• Add a div before password div tags
• Change in text of “Sign in” to “Signin”
Thanks for reporting this, I will look into the problem.
My first guess without executing the code is, that you are using the Unbreakable feature. Note that this does not work for some complex XPaths (see #391), and a corresponding warning should appear in the execution logs.
I will do a deeper analysis and report my findings here.
Thanks for the detailed reproduction steps. It really helps to be able to reproduce a problem fast.
I could verify that this breaks the test due to the above mentioned missing support for XPath.
We use slf4j-api for log output which requires a binder (e.g. logback). Once you add such a binder to your project, you will see the following log output:
However, we currently see XPath selectors not as a high priority, as initial mockups show a great complexity to implement such a feature.
While XPath selectors work as long as there is no breaking change, we currently recommend to use them only in a very stable environment. Thus I would ask to use alternative selectors (e.g. id) in the meantime. We support very simple single element CSS selectors (refer to #389 and #390).
I will add your selectors to the aforementioned issue, consider this as acknowledged and therefore close this as duplicate of #391. If you have any other issues or remarks related to this issue, please consider reopening.
Describe the Bug
Recheck web scripts breaks in case of xpath.
I've tried different combinations of xpath but it does not work for any.
Note: I've used demo-app html file from official recheck web demo.
https://github.com/retest/recheck-web-example/blob/master/src/test/resources/demo-app.html
How to Reproduce?
Refer attach document for more details
Below code works fine even if there are changes in object properties
driver.findElement(By.id("username")).sendKeys("Simon");
driver.findElement(By.id("password")).sendKeys("secret");
driver.findElement(By.id("Sign in")).click();
However, below code fails for the same changes in object properties. Recheck-web does not work in case of xpath properties.
driver.findElement(By.xpath("//[@id="username"]")).sendKeys("Simon");
driver.findElement(By.xpath("/html/body/div/div/form/div[2]/input")).sendKeys("secret");
driver.findElement(By.xpath("//[test()='sign-in']")).click();
Changes made in object properties to replicate issue:
• Remove Id for username
• Add a div before password div tags
• Change in text of “Sign in” to “Signin”
Setup
Refer attach project for details and logs
Additional Context
Refer attachment.
RecheckWebIssueRelatedToXpath.docx
RecheckSeleniumDemo.zip
The text was updated successfully, but these errors were encountered: