0
I’m trying to create an automation in python - (web scraping) that has a loop in which xpath changes every time you click on the desired location, so I realized that xpath only changes one digit:
//*[@id="j_id184:dados:0:j_id306"]
//*[@id="j_id184:dados:1:j_id306"]
//*[@id="j_id184:dados:2:j_id306"]
You could put that number as a variable?
Or is there another way to do it?
code considering only one object:
self.webDriverWait(self.driver,15).until(self.ec.element_to_be_clickable((self.by.XPATH,'//[@id="j_id184:dados:0:j_id306"]')))
click_nfs = self.driver.find_element_by_xpath('//*[@id="j_id184:dados:0:j_id306"]')
That’s exactly what I was looking for, thank you very much!
– Fabricio Melo