If y'all run into selenium IDE commands amongst examples on COMMAND LIST PART 1 too COMMAND LIST PART 2, You volition honour many commands to perform dissimilar actions on spider web page. But nonetheless selenium IDE accept non whatever commands to perform few actions straight similar showing hidden chemical component subdivision or hiding whatever
visible element. Example - To eanble or disable whatever chemical component subdivision from spider web page, selenium IDE accept non whatever guide ascendance but nosotros tin produce it real easily using javascript amongst "runScript" ascendance equally described inwards THIS POST.
Javascript back upward inwards selenium IDE is biggest produce goodness past times which nosotros tin perform this sort of actions. You tin thought this sort of to a greater extent than selenium IDE - javascrpt examples on THIS PAGE.
To demo hidden chemical component subdivision nosotros tin role javascript amongst "runScript" command. Same way, To cover whatever visible element, nosotros tin role "runScript" ascendance amongst javascript equally shown inwards bellow given example.
New Test | ||
Command | Target | Value |
setSpeed | 2000 | |
open | ||
runScript | document.getElementsByName('Hidden')[0].setAttribute('type', 'text') | |
runScript | document.getElementsByName('To Hide')[0].setAttribute('type', 'hidden') |
In inwards a higher house example, setAttribute() html dom method volition supplant type attribute value from "hidden" to "text" for Hidden text box to demo it on page. sec "runScript" ascendance volition produce contrary thing.