Hello. Could you help me? I've heard that CSS works faster then Xpath. E.g. from here http://saucelabs.com/blog/index.php/2011/05/why-css-locators-are-the-way-to-go-vs-xpath/ I'm trying to use CSS instead XPATH, to access element. I'm working with watir-webdriver (for Chrome). I've tried smth. simple, which works properly for Selenium or Watir- driver (for IE):
browser.link(:css, "form>a").click It doesn't work for watir-webdriver. I've tried: require "watir-webdriver" require "selenium-webdriver" include Watir browser = Browser.new :chrome driver = browser.driver driver.navigate.to '@URL@' driver.find_element(:css, "@Locator@").send_keys "asdf" It works correct, even in Crome, but maybe in this way I lose all benefits CSS in speed. I think... -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
