Blog

  • Home
  • SELENIUM
  • GoBack, Refresh, MouseOver and Highlight commands - SELENIUM

GoBack, Refresh, MouseOver and Highlight commands - SELENIUM

  • (4.0)
  • | 1652 Ratings

Selenium Commands

Go Back

If user clicks Back button of the Browser, then we need to use below command
Syntax:-
goBack()
Simulates the user clicking the “back” button on their browser

Interested in mastering Selenium Training? Enroll now for FREE demo on Selenium Training Course.

Refresh

If the user wants to press the refresh key or button in browser.
Syntax:
         refresh()
Simulates the user clicking the “Refresh” button on their browser.

Related Page: Automation Selenium RC Using TestNG - Selenium

Enter key simulation

If user press Enter button from key board, then we need to use below command.
Syntax:-
      keyPress(locator, keySequence)
Arguments:

  • locator - an element locator
  • keySequence - Either be a string(“” followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: “w”, “119”.
  • Simulates a user pressing and releasing a key.

Checkout Selenium Interview Questions

MouseOver

If a user hover the mouse on an element
Syntax:
     mouseOver(locator)
Arguments:

  • locator - an element locator
  • Simulates a user hovering a mouse over the specified element.

Checkout Selenium Tutorial

Highlight

If you want to execute specific step
Syntax:
     highlight(locator)
Arguments:
locator - an element locator

Briefly changes the background Color of the specified element yellow. Useful for debugging.

  • Find
  • Find is a button in selenium IDE. Which is used to find the element.
Explore Selenium Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

Infographics on Selenium Commands:

 Selenium Commands




Subscribe For Free Demo

Free Demo for Corporate & Online Trainings.

Madhuri Yerukala
About The Author

Madhuri is a Senior Content Creator at MindMajix. She has written about a range of different topics on various technologies, which include, Splunk, Tensorflow, Selenium, and CEH. She most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .


DMCA.com Protection Status

Close
Close