lundi 26 mars 2018

Selenium Java - How to click on an element without having it ID?

I'm trying to click in a radio button by it's Xpath or Id. I inspected the element with Google Developer Tool. Either it gives me the element name: <label for="1346_Voltagem_0" class="dimension-Voltagem espec_0 skuespec_110v skuespec_Voltagem_opcao_110V skuespec_Voltagem_opcao_110v">110V</label> and if I copy its Xpath: /html/body/div[9]/div/div/div[3]/div[3]/div[1]/div/ul/li[2]/span/label[1]

I would like to know how to say to the code that it has to click on that radiobutton? Here is the link for the page I want to click http://loja.consul.com.br/geladeira-consul-frost-free-386-litros-evox-crm42nk/p and a screenshot that shows the button

actual image




Aucun commentaire:

Enregistrer un commentaire