I need to use the functions defined in user-extensions.js.We are in a process of migration from RC to webdriver. I came to know, that there is JavascriptExecutor which will replace runScript and getEval.But how will i specify the user-extensions.js file. Is it same as java -jar selenium-server-standalone.jar -userExtensions user-extensions.js?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
Finally, after 2 years and 2 months I found a solution to use user-extensions file in webdriver and now we are migrating to webdriver.
Function is below:
There is not a way to inject javascript that is available through your test run like Selenium RC, here is a thread about some possible migration tips: http://groups.google.com/group/selenium-developers/browse_thread/thread/15cb4b774b734cc7/c7baf10db0bc2bc0
They now have an interface called IJavaScriptExecutor that can be used to replace user extensions.
This is the C#/NUnit version.
Here is the Java/JUnit version: