Mindmajix

GoBack, Refresh, MouseOver and Highlight commands

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

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.

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.

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.

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.

 Enroll for Instructor Led Live Selenium Training

0 Responses on GoBack, Refresh, MouseOver and Highlight commands"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.