Page Object Model (POM) & Page Factory: Selenium WebDriver Tutorial (hard)

AwedExuberance avatar
AwedExuberance
·
·
Download

Start Quiz

Study Flashcards

Questions and Answers

Which design pattern is popularly used in test automation to create Object Repository for web UI elements?

Page Object Model

What is the advantage of using Page Object Model in test automation?

Reduces code duplication

What should be the name of the methods in the Page Class of Page Object Model?

Descriptive names

What is the purpose of the waitForPaymentScreenDisplay() method in Page Object Model?

<p>To wait for the payment gateway to appear</p> Signup and view all the answers

What is the main task in UI Automation using Selenium WebDriver?

<p>Finding elements and filling values</p> Signup and view all the answers

Which pattern is often used in conjunction with Page Object Model in Selenium?

<p>Page Factory Pattern</p> Signup and view all the answers

What is the script maintenance like when using Page Object Model?

<p>Easy</p> Signup and view all the answers

Which annotation is used in Page Factory in Selenium to find a WebElement?

<p>@FindBy</p> Signup and view all the answers

What is the purpose of the initElements method in Page Factory in Selenium?

<p>To initialize Page class elements</p> Signup and view all the answers

Which attribute can @FindBy accept in Page Factory in Selenium?

<p>xpath</p> Signup and view all the answers

What is the purpose of Page Factory in Selenium?

<p>To optimize the Page Object Model framework</p> Signup and view all the answers

What is the purpose of the @FindBy(className="barone") annotation in the Guru99Login class?

<p>To find the title text</p> Signup and view all the answers

What is the purpose of the getHomePageDashboardUserName() method in the Guru99HomePage class?

<p>To get the username from the home page</p> Signup and view all the answers

What is the purpose of the test_Home_Page_Appear_Correct() method in the Test99GuruLoginWithPageFactory class?

<p>To test the login page title</p> Signup and view all the answers

What is the chief problem with script maintenance?

<p>Changing multiple scripts</p> Signup and view all the answers

What is the advantage of using the Page Object Model (POM) in Selenium?

<p>Makes the code more readable and maintainable</p> Signup and view all the answers

What is the purpose of the Guru99Login class in Selenium?

<p>To fill web elements</p> Signup and view all the answers

What is the purpose of the Guru99HomePage class in Selenium?

<p>To verify web elements</p> Signup and view all the answers

What is the purpose of the setUserName method in the Guru99Login class?

<p>To fill the user name element</p> Signup and view all the answers

What is the purpose of the getHomePageDashboardUserName method in the Guru99HomePage class?

<p>To verify the home page element</p> Signup and view all the answers

What is the purpose of the loginToGuru99 method in the Guru99Login class?

<p>To fill web elements</p> Signup and view all the answers

Which design pattern is used in Selenium WebDriver to create an Object Repository?

<p>Page Object Model</p> Signup and view all the answers

What is the purpose of using Page Factory in Selenium?

<p>To create an optimized way of creating object repositories</p> Signup and view all the answers

What is the purpose of the AjaxElementLocatorFactory in Selenium?

<p>To create a lazy loading concept</p> Signup and view all the answers

Which exception is thrown when an element is not found within the given time interval in Selenium?

<p>NoSuchElementException</p> Signup and view all the answers

What is the advantage of using the PageFactory pattern in Selenium?

<p>It creates an optimized way of creating object repositories</p> Signup and view all the answers

What is the purpose of the objHomePage object in the given code snippet?

<p>To verify the home page</p> Signup and view all the answers

What is the purpose of the Assert.assertTrue statement in the given code snippet?

<p>To verify the home page</p> Signup and view all the answers

What is the purpose of the getHomePageDashboardUserName method in the given code snippet?

<p>To verify the home page</p> Signup and view all the answers

What is the purpose of the driver object in the given code snippet?

<p>To go to the next page</p> Signup and view all the answers

More Quizzes Like This

Page's Book Report
10 questions

Page's Book Report

EventfulGoshenite avatar
EventfulGoshenite
Page 1-4 final pdf
20 questions

Page 1-4 final pdf

WellBehavedCognition9443 avatar
WellBehavedCognition9443
page 6 and 7 physics
29 questions

page 6 and 7 physics

FreshAestheticism avatar
FreshAestheticism
Use Quizgecko on...
Browser
Browser