XPath, Test data variables on Specflow

 XPath is not a very reliable element to use for automation especially in start up projects as there would be a lot of changes. (e.g. if developer change the position of the element)

XPath syntax:



Example of self-written XPath:


Example 2:


A more stable way to create XPath:


Good practice for recognizing element:

1. Always use ID if available as they are unique

2. Name

3. Class - if class is unique

4. use text

5. copy paste XPath

-------------

Test Data variables on Specflow:

*There must be method that could check and assert the variables here.

Comments

Popular posts from this blog

Specflow, Gherkin

DevOps, Github

Test Automation tool, VS, selenium, Github, Gitbash