HOW TO ASSERT LINK OF SEARCH ITEM IN GOOGLE SEARCH PAGE USING SELENIUM IDE?

  • Open Firefox browser.
  • Open selenium IDE from Tools in browser.
  • Verify the RECORD button is ON in selenium IDE window. 


  • Navigate the browser to www.google.co.in
  • Type “helloselenium blog” in Search textbox.
  • Click on Search button. 
  • Assert the search result present for “Hello Selenium” blog.



Command
Target
Value
open
/
type
id=gbqfq
helloselenium blog
click
id=gbqfb

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



  • Modify the recorded script in selenium IDE window. 
Command
Target
Value
open
/
type
id=gbqfq
helloselenium blog
clickAndWait
id=gbqfb

assertTextPresent
helloselenium.blogspot.com

* Base URL:
http://www.google.co.in/
  • Save the recorded script.
  • Run the recorded script.

In the above script we have added a new row to assert the hello selenium blog link.


Post a Comment

0 Comments