I'm using latest robot framework with the selenium library 2.2.2. I
have installed that on two computers. On the one I have successfully
run the test suites, but on the other machine I run into the FAIL:
No keyword with name 'Add Location Strategy' found.
I have checked the selenium.py script and on both machines the keyword
is there:
def add_location_strategy(self,strategyName,functionDefinition)
What lets the robot think it is not there? Other Selenium Library
calls are fine:
- Start Selenium Server -firefoxProfileTemplate, .\\lib\
\SeleniumFirefoxProfile
- Set Selenium Timeout 60 seconds
- Open Browser ${LOGIN URL}, ${BROWSER}
where processed successfully.
On both machines I'm running the script with Jython/Jybot.
You will have to modify selenium-library.jar to add some java script
code for the new location strategy. I did that for JQuery. More on my
blog: http://www.radekw.com/blog/2009/11/03/jquery-selectors-in-selenium/
I'm happy to hear that there is some interest in this functionality
and I hope the patch will make it to some next release.
--
Radek
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To post to this group, send email to robotframe...@googlegroups.com.
To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
The seleniumpy file included in the SeleniumLibrary is the Selenium RC
Python API. The actual keywords provided by the library are in the
SeleniumLibrary class that is created in __init__.py, and which
extends classes in other modules and thus includes methods from them
as keywords too.
As Radek already wrote, he has added an enhancement request about
exposing add_location_strategy method as a keyword [1] and also
written a blog post on how to enable jQuery selectors using it. As I
just wrote in a comment to the issue, I don't see any real problem in
adding that keyword into the next release, and we could even consider
bundling the jQuery selector support into the selenium-server.jar
distributed with the library.
[1] http://code.google.com/p/robotframework-seleniumlibrary/issues/detail?id=59
[2] http://www.radekw.com/blog/2009/11/03/jquery-selectors-in-selenium
Notice also that there's a separate enhancement idea about adding
`Call Selenium API` keyword to make it possible to call all the
Selenium RC methods even if they weren't exposed as "real" keywords.
[3] http://code.google.com/p/robotframework-seleniumlibrary/issues/detail?id=74
Cheers,
.peke
PS: It seems to me that SeleniumLibrary 2.2.3 is turning into 2.3.
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org