Problem with Xpath in IE (selenium core 0.9.2)

I am writting here problems with IE and FF in Ruby using selenium. Core 0.9.2

A the first problem with Xpath:
Xpath this is cool but very slow in IE ( Internet Explorer 6 or 7).
same example for Xpath:

@selenium.click(“//img[@id=’img_headWelcome’]”)

this is same easy code with id – this is  fairy tale :).
And if we click on this element by css selector.

@selenium.click(“css=img#img_headWelcome”)

And result – test on IE work more quickly.
At the next  I will tell about using DOM in code
example

@selenium.is_element_present(“dom=document.getElementById(‘t-profilesearch’).style.display=’block'”)

we check style block for div with current id (‘t-profilesearch’) and this is work on IE but if we using selenium function get_attribute for style we fail because selenium server for IE returns object and  for FF returns string with parameters.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: