I am trying to select for a particular information using xpath or css selector. But I keep on getting error messages. Can someone help with seeing what's wrong here?
Traceback (most recent call last):
File "sa.py", line 25, in <module>
output = driver.find_element_by_xpath("//td[@cl
File "C:\Python27\lib\site-packages\selenium\webd
return self.find_element(by=By.XPATH, value=xpa
File "C:\Python27\lib\site-packages\selenium\webd
{'using': by, 'value': value})['value']
File "C:\Python27\lib\site-packages\selenium\webd
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webd
raise exception_class(message, screen, stacktra
selenium.common.exceptions.NoSuchElementException:
td[@class=\'sku\']/p"}' ; Stacktrace:
at FirefoxDriver.prototype.findElementInternal_
[email protected]/components/driver_component.js:9
at FirefoxDriver.prototype.findElement (file://
ecode.com/components/driver_component.js:9479)
at DelayedCommand.prototype.executeInternal_/h
[email protected]/components/command_processor.js:1
at DelayedCommand.prototype.executeInternal_ (f
@googlecode.com/components/command_processor.js:114
at DelayedCommand.prototype.execute/< (file:///
code.com/components/command_processor.js:11402)
from selenium.webdriver.support.ui import WebDriverWait
from selenium import web
driverfrom selenium.common.exceptions import TimeoutExceptionfrom selenium.webdriver.support import expected_conditions as EC
url = "http://www.google.com"
#cas = "1300746-79-5"
cas = "100-44-7"
driver = webdriver.Firefox()
driver.get(url)
inputElement = driver.find_element_by_name("Query")
inputElement.send_keys(cas)
inputElement.submit()
pricing_link = driver.find_element_by_css_selector("li.priceValue a")
pricing_link.click()
output = driver.find_element_by_xpath("//td[@class='sku']/p")
print(output)
driver.quit()