"runScript" Command Example To Change Title Of Page In Selenium IDE

"runScript" command can be used for the different purpose in different condition. You can use it to run any java script in selenium IDE. View my previous 3 posts where i have described how to use "runScript" command for different purpose. Today we are taking one example of changing page title using "runScript"
command. Run bellow given example in your selenium IDE and look at page title when script execution complete.

You can view all examples of selenium IDE commands to use them in your test case.

Example 4 : Using "runScript" Command To Change Title Of Page

New Test
CommandTargetValue
openhttp://only-testing-blog.blogspot.com/2013/10/table.html
verifyTitleOnly Testing: Table
runScriptdocument.title = "New Page Title";
verifyTitleOnly Testing: Table
verifyTitleNew Page Title

THIS LINK will show you more examples of "runScript" command

Above example will change the actual page title (from 'Only Testing: Table' to 'New Page Title') using "runScript" command.

You can use this example to give title to your untitled page of software web application page to handle it in selenium IDE. You can look at different examples of handling multiple windows in selenium IDE.

No comments:

Post a Comment