jeudi 26 novembre 2020

How to verify toggle button is enabled or disabled in robot framework

I have multiple settings which I need to enabled or disabled in test automation step. I am using python-robot-selenium. I dont want manual to reset requirements before running the script. When my toggle buttons are enabled or disabled the xpath is same for both so I am not able to handle it. Any other way to achieve it?

Below is the xpath and full xpath for both enabled and disabled status of toggle button

Xpath = //*[@id="tabTest"]/div[2]/div[2]/div[2]/label
Full xpath = /html/body/div[2]/div[2]/div[4]/div[1]/div[2]/div/div[1]/div[2]/div[2]/div[2]/label

Buttons and its inspect element is as below.

enter image description here

enter image description here

Aucun commentaire:

Enregistrer un commentaire