0% found this document useful (0 votes)
11 views7 pages

Selenium Commands Part 1

This document provides an overview of various Selenium commands, including methods for opening URLs, retrieving page information, and interacting with web elements. It details commands for locating links, selecting multiple items from dropdowns, and submitting forms. The author encourages sharing the information and provides links to additional resources and a video tutorial.

Uploaded by

Petar Lazovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views7 pages

Selenium Commands Part 1

This document provides an overview of various Selenium commands, including methods for opening URLs, retrieving page information, and interacting with web elements. It details commands for locating links, selecting multiple items from dropdowns, and submitting forms. The author encourages sharing the information and provides links to additional resources and a video tutorial.

Uploaded by

Petar Lazovic
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Selenium Commands

with Details

Part - 1

By : Jaikishan Mohanty
#1) get() Methods
● [Link]("[Link] -- used to open an
URL and it will wait till the whole page gets loaded.
● [Link](); -- The command is used to retrieve the
Class object that represents the runtime class of this object
● [Link](); -- This command returns the URL
of the currently active web page in the browser.
● [Link](); -- This command helps in
getting the entire HTML source code of the open web page.
● [Link](); -- This command can be used for
displaying the title of the current web page.
● [Link](); -- delivers the innerText of a
WebElement.
● [Link]([Link]("findID")).getAttribute("va
lue"); -- used to retrieve the value of the specified attribute
● [Link](); -- used to tackle with the
situation when we have more than one window to deal with.
#2) Locating links by linkText() and partialLinkText()
● [Link]([Link](“jaikishan”)).click();
-- finds the element using link text

● [Link]([Link](“jai”)).click();
-- find the elements based on the substring of the link
#3) Selecting multiple items in a drop dropdown
// select the multiple values from a dropdown
● Select select = new
Select([Link]([Link]("Id_in_select_class"
)));
● [Link]("greenvalue"); - By Value
● [Link]("Red"); - By Visible Text
● [Link](2); - By Index
#4) Submitting a form
● [Link](By.<em>id</em>("submit")).submit();

[Link]("[Link]
[Link]([Link]("email")).sendKeys("abc@[Link]");
[Link]([Link]("pass")).sendKeys("123456");
[Link]([Link]("pass")).submit(); // submitting form with submit()

OR

[Link]([Link]("login")).click(); // submitting form with click()


Share with all your Friends.👫
“Whatever you want to achieve in life, Help others to achieve that!!! “

Video Link: Selenium Command Part 1

Testing Jobs: [Link]

All PDF file: [Link]

THANK YOU
Jaikishan Mohanty

You might also like