Enabling/Disabling Text Box In Selenium IDE Using Javascript

Before discussing on enabling/disabling whatever chemical component subdivision inwards selenium IDE, Let me country yous i affair - Selenium IDE is less powerful compared to Selenium RC together with WebDriver, nosotros tin non perform all the tasks inwards selenium IDE. But all the same nosotros tin automate unproblematic flows rattling easily inwards selenium IDE compared to webdriver because
selenium IDE is unproblematic tape together with play tool together with editing its script is also rattling easy. If yous accept non used selenium IDE whatever fourth dimension together with therefore yous tin await at these SELENIUM IDE COMMANDS WITH EXAMPLES. Let me concentrate on electrical current intelligence point.

We accept seen how to enable or disable text box inwards webdriver using javascript executor inwards THIS POST. Now if yous wants to exercise same affair inwards selenium IDE together with therefore how tin yous exercise it? Yes selenium IDE is also supports javascript together with nosotros tin exercise it rattling easily past times using javascript amongst runScript command. You tin sentiment to a greater extent than examples of purpose of javascripts inwards selenium IDE on THIS LINK.

In bellow given example, 1st "runScript" ascendancy volition disable First Name text box together with 2d "runScript" ascendancy volition enable Last Name text box. Run it inwards your selenium IDE window together with uncovering number inwards page. This agency javascript makes rigid to selenium IDE.


New Test
CommandTargetValue
setSpeed2000
open
runScriptdocument.getElementsByName('fname')[0].setAttribute('disabled', '')
runScriptdocument.getElementsByName('lname')[0].removeAttribute('disabled');


More interesting articles here :Generation Enggelmundus Internet Marketing Tool here :Zeageat IM http://www.software-testing-tutorials-automation.com/
Post a Comment (0)
Previous Post Next Post