Reputation: 27
i used Selenium IDE on Firefox to find the xpath of buttons. The next step is to click the button on Python. I tried inserting the xpath in the code below, but no luck. I do not know how to change the xpath so that it fits to the code below.
browser.find_element_by_xpath('')
Any help is appreciated!
Upvotes: 0
Views: 2528
Reputation: 4173
Be careful with quotes and double quotes, use double outside and simple inside, for example
"//*[@class='myClass']"
Try this:
browser.find_element_by_xpath("(//button[@type='button'])[209]")
You should get the selector manually in another way, this selector is not reliable at all, if any of the previous button is missing you will click the wrong button.
Upvotes: 1