views:

28

answers:

1

Hi everyone,

I want to include Jquery to our current automation project running Selenium RC ( written in java ).

So we can rely on that JS library for writing our java script code extending the current user-extension.js.

I have heard and searched the web and many say it can be done, by include the source in the user extension o even by adding the library to the core selenium-server.jar.

I have tried both approaches with out luck.

All the time I try to reference Jquery in my java script code, I get a Selenium error "jQuery is not defined".

Maybe am calling the jquery functions wrong inside my user-extension.js, I just don't know.

Any help or guidance would be appreciated. bye

A: 

I use runScript() and able to attach jQuery to any page in Selenium RC

http://github.com/tszming/Selenium-Google-Scrapper/blob/master/selenium-google-scraper.php

The script is not Java, but I believe you can use the same approach.

** Use window.jQuery instead of jQuery in the getEval() call

tszming