HOW TO USE CAPTUREENTIREPAGESCREENSHOT COMMAND IN SELENIUM IDE?




Run the below script in selenium IDE:
Command
Target
Value
storing a search key as variable


store
hello selenium
x
store
1
y
test script started from here


while
(${y}<10)

gotoif
storedVars['y']<5
google
storeEval
alert('Test execution stopped!!')

label
google

echo
${x}

echo
${y}

open
/
focus
//input[@id='gbqfq']

type
//input[@id='gbqfq']
${x}
focus
//button[@id='gbqfb']

clickAndWait
//button[@id='gbqfb']

captureEntirePageScreenshot
D:\\SeleniumIDE\\${x}${y}.jpg

storeEval
storedVars['y'] = ${y}+1

endWhile


test script ended from here


storeEval
alert('Test executed successfully!!')

* Base URL:
http://www.google.co.in/









In the above script we are using captureEntirePageScreenshot command to capture the screenshot of the page after the script execution and saving the captured screenshot at the location “D:\\SeleniumIDE\\” with defined file format “.jpg”.

Read more about CAPTUREENTIREPAGESCREENSHOT COMMAND IN SELENIUM IDE USING FLOW CONTROL EXTENSION.



Post a Comment

0 Comments