Many thanks to those who answered my original question bit I still have a similar issue, so let me open a new discussion as technically it's separate question on the same topic. Unfortunately none of methods suggested in answers to my first question seem to work here, please see that questions for error messages.
I am trying to click on text links and that do not work:
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://ift.tt/1qdaSGF")
driver.find_element_by_name("username").send_keys(email)
driver.find_element_by_id("existingUser").click()
driver.find_element_by_id("fld-password").send_keys(password)
driver.find_element_by_xpath("//*[contains(text(), 'Continue')]").click() # works
driver.get("http://ift.tt/1sQlGuQ")
driver.find_elements_by_xpath("//*[text()='For Sale']")[-1].click() # works
driver.find_element_by_xpath("//*[contains(@span,'Appliances']").click() # this still does not work
driver.find_element_by_xpath("//*[contains(@span,'Home Appliances']").click() # this still does not work
driver.find_element_by_xpath("//*[contains(@span,'Other Home Appliances']").click() # this still does not work
HTML:
<span class="category-name">
<span class="category-list-control is-parent">::before
</span>
Appliances
</span>
What do I do wrong?
Aucun commentaire:
Enregistrer un commentaire