Is there any discernible reason as to why Selenium finds and successfully executes the following command on a Firefox browser, but not IE8 (via selenium RC)
selenium.click("//input[@type='Radio'
and starts-with(@name, 'client-select')
and @value='0']");
Im assuming its something to do with IE “rendering” (not sure the correct term) xpath differently to firefox. Is this the case? How do they differ? What articles do you know that will help me overcome this and similar issues regarding the two browsers and xpath?
Much thanks.
EDIT
The element in question is:
<input type="Radio"
value="1"
onfocus=""
onclick="return doRTgl(this);"
onblur=""
name="client-select_1580158">
Its nested within some pretty messed up nested tables, and is added dynamically via Ajax.
My solution was to remove the type from the xpath locator
Which fortunately left me with enough information to find the unique element each time.
As far as the generic question, an xpath that works on Firefox won’t necessarily work on IE. This was the only case however I found during refactoring of my code. For future reference, just have to test on each, find the differences and work around.