I'm testing a web page where I need to check whether objects are visible.
jQuery has a simple method to do that, namely: $(element).is(":visible")
I don't know how to do the same with robot and/or selenium.
Therefore I'd like to be able to execute jQuery commands from robot. Is it possible?
I found that you can define a jQuery based location strategy as described here: http://code.google.com/p/robotframework-seleniumlibrary/wiki/jQueryElementSelectors
But I don't want to locate the objects (I know their IDs), I need to check their visibility.
It would be nice if anybody could give me a hint how to do it.
Thanks,
Heiko
PS: Of course, it doesn't have to be jQuery. I'd appreciate any other way to determine the visibility.
Have you tested `Element Should (Not) Be Visible` keywords in
SeleniumLibrary 2.5?
Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org
You should be able to execute arbitrary jQuery (which after all is
just JavaScript) with Execute Javascript -keyword of SeleniumLibrary.
That keyword just returns the value of the last executed statement.
thanks,
__j
--
Janne Härkönen | Software Craftsman @ Reaktor
http://reaktor.fi | http://twitter.com/#!/janneharkonen
that was too easy :-)
Kiitos for your hint, it works fine.
My bookmark of the selenium library documentation was stuck at 2.4, so I hadn't found it.
Out of curiosity, I also tried to execute the jQuery through Selenium as suggested by Janne, but somehow I didn't manage to do that yet. But I'll keep trying...
Regards,
Heiko