Using an OR condition in Xpath to identify the same element

前端 未结 3 1379
花落未央
花落未央 2020-12-03 08:51

I have this logic which gets the current page\'s title first clicks on next button, fetches the title again and if both the titles are the same, meaning navigation has not m

3条回答
  •  情深已故
    2020-12-03 09:28

    If the element has two xpath, then you can write two xpaths like below

    xpath1 | xpath2

    Eg: //input[@name="username"] | //input[@id="wm_login-username"]

    It will choose any one xpath

提交回复
热议问题