Locators in Selenium (easy)

AwedExuberance avatar
AwedExuberance
·
·
Download

Start Quiz

Study Flashcards

30 Questions

Which command in Selenium IDE is used to locate GUI elements?

locator

What is the most common way of locating elements in Selenium IDE?

ID

Which locator is used to locate elements by their name attribute in Selenium IDE?

name

Which locator is used to locate elements by their link text in Selenium IDE?

link text

Which locator is used to locate elements by their DOM in Selenium IDE?

DOM

Which locator is used to locate elements by their XPath in Selenium IDE?

XPath

Which of the following commands in Selenium IDE does not require a locator?

open

Which tool is used to locate elements in Selenium IDE?

Firebug

Which locator is used to locate an element by its ID?

id

What is the target format for locating an element by its name?

name=name_of_the_element

What are filters used for in Selenium IDE?

To locate elements with the same name

Which command is used to click on an element in Selenium IDE?

click

Which locator is used to locate a hyperlink text in Selenium IDE?

link

What is the target format for locating a hyperlink text in Selenium IDE?

link=link_text

Which method can access only one element at a time in Selenium IDE?

getElementById

What is the syntax for using the getElementById method in Selenium IDE?

document.getElementById("id of the element")

Which method collects an array of elements that have the same name in Selenium IDE?

getElementsByName

What is the syntax for using the getElementsByName method in Selenium IDE?

document.getElementsByName("name")[index]

Which method applies only if the element is contained within a named form in Selenium IDE?

dom:name

What is the syntax for using the dom:name method in Selenium IDE?

document.forms["name of the form"].elements["name of the element"]

What is the keyword that Selenium IDE automatically interprets as a path within the DOM?

document

Which method of locating elements in Selenium IDE can access almost any element, even those without class, name, or id attributes?

Locating by XPath

What is the syntax for locating an element by its ID in Selenium IDE?

id= id_of_the_element

What is the syntax for locating an element by its Name in Selenium IDE?

name=name_of_the_element

What is the syntax for locating an element by its Name using Filters in Selenium IDE?

name=name_of_the_element filter=value_of_filter

What is the syntax for locating an element by its Link Text in Selenium IDE?

link=link_text

Which method of locating elements in Selenium IDE uses the form's index and not its name?

Locating by DOM

What is the syntax for locating an element by its index of the form and index of the element in Selenium IDE?

document.forms[index of the form].elements[index of the element]

What is the syntax for locating an element by its index of the form and using the element's name instead of its index in Selenium IDE?

document.forms["home"].elements["userName"]

What is the advantage of using XPath to locate elements in Selenium IDE?

It can access almost any element, even those without class, name, or id attributes.

Learn how to use locators in Selenium IDE to successfully click on the "REGISTER" link and navigate to the registration page using the Document Object Model (DOM). Master the technique of accessing page elements in Selenium IDE.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser