"assignId" and "captureEntirePageScreenshot" commands of selenium IDE

"captureEntirePageScreenshot" command

This command is very useful for capture and save full page screenshot. You can use this command anywhere in between. It will store screen shot of current selected browser tab.


New Test
Command Target Value
open http://www.google.com
captureEntirePageScreenshot D:\\selenium.jpg

VIEW CAPTURE SCREENSHOT EXAMPLE IN WEBDRIVER

In above example, "captureEntirePageScreenshot" command will capture and store screenshot of Google home page in "D" drive with file name selenium.jpg. You can change file name and file storing path as you
wish. Main benefit of this command is it will store whole entire page screen shot without considering length of the page.

"assignId" command

 "assignId"  command is useful to assign temporary "id" to an element. Main benefit of this command is you can assign id to an element rather than a slow/complicated XPath. Once you will assign id to an element, you can use that id as an element identifier. Don't forget that id will disappear once your page will be reloaded.


New Test
Command Target Value
open http://www.google.com
assignId id=gbqfq box
assignId id=gbqfb button
type box Download Selenium
click button

In above example, i have assigned id "box" to Google search box and assigned id "button" to Google search button. In next command, i have used that id for Google search box and button.

1 comment:

  1. Hi Prakash,
    I am new to Sel IDE and finding this site really useful and intresting.
    Can you also post on while loops and gotoif etc commands how can we do in ide. Also can you also post on how to do data driven testing in sel ide. like for ex, using multiple ids/pwds to login into a site?

    Cheers,
    Anagha

    ReplyDelete