Hi
I followed (Mr/Ms) Asha's suggestion in the following forum and it worked for me.
Hope this help for you
Rgds
https://groups.google.com/forum/#!topic/selenium-users/rhLk11Ksy-I---
If you can rebuild selenium-server.jar with the your new user-extensions.js, it will recognize your custom functions.
I did this using Winzip. The steps followed are:
1) Downloaded the selenium-server.jar
2) Opened it using winzip and extracted the "user-extensions" file
alone in it to my C drive. So now I have the user-extansions.js in my
C:\core\scripts folder.
3) Edited user-extensions.js by adding some custom methods that I needed.
4) Now using Winzip again, added this modified user-extensions.js to the selenium-server.jar. For this,
-- Open selenium-server.jar using Winzip.
-- Use the "Add" button on the top bar of Winzip
-- In the "Add" window, browse to C:\core\scripts\user-
extensions.js file
-- Make sure that the "Actions" choosen is "Add (and replace) Files"
and "Save full path info" is checked in the "Folders" option.
-- This will replace the user-extensions.js in the
selenium-server.jar with our modified user-extensions.js with same path
information.
-- Close Winzip
5 ) Now the new selenium-server.jar is ready with your own user-extensions.
6) You can execute with usual RC syntax:
path/to/java -jar name-of-selenium-rc-jar -htmlSuite <browser> <startURL> <suiteFile> <resultFile>
I could do this successfully in my test environment and the version of Winzip I am using is Winzip 8.1
Regards,
Asha.
---
Vào 22:41:23 UTC+7 Thứ hai, ngày 15 tháng mười năm 2012, Kam Hor đã viết: