Quality Testing

Quality is delighting customers

Calling JavaScript function using Selenium Tool?

Hi,

Calling JavaScript function using Selenium Tool? How to do that?

Thanks,
Madhuri

Views: 753

Reply to This

Replies to This Discussion

java script or snippet we call it in selenium, we can write using the dom concept or css concept .
Example: Selenium RC code
Selenium sel
sel.getEval("dom=window.document.getElementsByName('password')[0].value=test123"); //enter the password
String pwd =sel.getEval("dom=window.document.getElementsByName('password')[0].value");// retrieve the value from the application

In the above example, sel is the object instance created to perform the required opertaion.
getval is the commond, it will execute the java snippet.


Thanks,
Chethan

RSS

TTWT Magazine


Advertisement

Advertisement

Advertisement

Advertisement

© 2020   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service