Hurry! 20% Off Ends SoonRegister Now

Commands in Context Menu - Selenium

To open the context menu, Start selenium IDE and right-click on any opened firefox browser, you can see the context menu.

  • Assert
  • Verify
  • Wait For
  • Store
Commands in Context Menu

Assert

An “assert” will fail the test and abort the current test case
When we assert for an element it will return a Boolean value. True if the pattern matches the text, false otherwise. Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.

Assert

MindMajix Youtube Channel

Desired to gain proficiency on Automation tool? Explore the blog post on Selenium Training to become a pro in Selenium.
Assert- Wizard

Verify:

Check Out Selenium Tutorials

A “verify” will fail the test and continue to run the test case.  True if the pattern matches the text, false otherwise. Verifies that the specified text pattern appears somewhere on the rendered page shown to the user.

Verify
Verify- Wizard

Wait For:

Wait ForCommand will wait until specific time

Wait For

Without waitFor command:-

Without waitFor command

With waitFor Command:

With waitFor Command

Store Element:

To Store Elements or the text on the web page . Sometimes there is a need to store elements that are on the page to be used later in a test. This could be that your test needs to pick a date that is on the page and use it later so that you do not need to hardcode values into your test.
To see how this works, let’s work through the following example:

Get interview-ready with this tutorial on most popular Selenium interview questions and best ways to answer them.
  • Open the Selenium IDE and switch off the Record button.
  • Right-click on the text Assert that this text is on the page, go to the storeText command in the context menu, and click on it. If it does not display there, go to Show all Available Commands and click on it there.
  • A dialog will appear similar to the next screenshot. Enter the name of a variable that you want to use. I have used textOnThePage as the name of my variable
  • Click on the row below the storeText command in Selenium IDE.
  • Type the command type into the Command textbox.
  • Type storeinput into the target box.
  • Type javascript{storedVars[‘textOnThePage’];} into the value box.
  • Run the test.
Store Element
Store Element-Wizard

 

 

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
Selenium Training Dec 24 to Jan 08View Details
Selenium Training Dec 28 to Jan 12View Details
Selenium Training Dec 31 to Jan 15View Details
Selenium Training Jan 04 to Jan 19View Details
Last updated: 28 Sep 2024
About 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 spends most of her time researching on technology, and startups. Connect with her via LinkedIn and Twitter .

read less
  1. Share:
Selenium Articles