Interesting topic. I wonder if there are still, in WebDriver, browser differences in detecting elements (by CSS, XPath, ID, name) as there were in Selenium RC (one CSS/XPath expression may work in one browser but not another, etc.).
Also, in Selenium RC, all the browsers used the Sizzle library for CSS. With WebDriver, browsers natively use its own engine for CSS selectors, except where there is no such support (e.g. IE) where it falls back to Sizzle. So I assume SafariDriver is using Safari's native CSS selector implementation?
Would be interesting to see if you inject Sizzle and then use that to find the CSS selector whether that would work or not.
http://selenium.polteq.com/en/injecting-the-sizzle-css-selector-library/ On Thursday, July 5, 2012 5:07:09 AM UTC-7, Pereter wrote:
I'm using 2.24 WebDriver to navigate trough Safari Browser.I use FindElement(By.CssSelector....)
It's all right whe I use "#lzero-personal-form" but when i'm trying to access element like "#lzero-personal-form .form-inner", I receiving an error like:
Could not find element: {"id":":wdc:1341489759957","using":"id","value":"#lzero-personal-form .form-inner"}
It fully works in FireFox.
What can be a problem?
Do I need to use special css selectors for Safari?