Creating Object Repository in Selenium WebDriver: XML & Properties file (hard)
20 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which of the following is NOT a major advantage of using an object repository in Selenium WebDriver?

  • Segregation of objects from test cases
  • Built-in object repository (correct)
  • Easy maintenance of locator values
  • Increased modularity of framework implementation

What is the purpose of an object repository in Selenium WebDriver?

  • To store web elements
  • To execute test cases
  • To identify test scenarios
  • To segregate objects from test cases (correct)

Which approach can be used to create an object repository in Selenium WebDriver?

  • Test case approach
  • In-built repository approach
  • Properties file approach (correct)
  • Key-value pair approach

What is stored in a properties file in Selenium WebDriver?

<p>Key-value pairs (C)</p> Signup and view all the answers

What is the purpose of the string 'mobileTesting' in the tutorial?

<p>To identify the Mobile Testing link within the webpage (C)</p> Signup and view all the answers

What type of object repository is created using a properties file in Selenium WebDriver?

<p>Properties file repository (A)</p> Signup and view all the answers

What is the purpose of the demo website mentioned in the tutorial?

<p>To showcase Selenium WebDriver features (A)</p> Signup and view all the answers

What is the major advantage of using an object repository in Selenium WebDriver?

<p>Segregation of objects from test cases (C)</p> Signup and view all the answers

What does the XPATH in the string 'mobileTesting' represent?

<p>Locator value (B)</p> Signup and view all the answers

What is the purpose of creating an object repository in Selenium WebDriver?

<p>To increase modularity of framework implementation (D)</p> Signup and view all the answers

Which method can be used to read data from a properties file in test scripts?

<p>read (A)</p> Signup and view all the answers

What is the purpose of using an XML file in test scripts?

<p>To pass data as a parameter to findElement method (C)</p> Signup and view all the answers

Which class is used to read data from an XML file in Java?

<p>SAXReader (C)</p> Signup and view all the answers

What is the purpose of the 'dom4j' class in Java?

<p>To read data from an XML file (B)</p> Signup and view all the answers

Which step is required before reading data from an XML file in Java?

<p>Create a File object (C)</p> Signup and view all the answers

What is the purpose of the 'selectSingleNode' method in Java?

<p>To access individual nodes of the XML document (A)</p> Signup and view all the answers

What format does an XML file replicate?

<p>HTML format (C)</p> Signup and view all the answers

What should be done before using an XML file in test scripts?

<p>Add JAR files to the buildpath (B)</p> Signup and view all the answers

What is the purpose of using a properties file in test scripts?

<p>To pass data as a parameter to findElement method (A)</p> Signup and view all the answers

What is the purpose of the 'findElement' method in test scripts?

<p>To locate an element on a webpage (C)</p> Signup and view all the answers

More Like This

Use Quizgecko on...
Browser
Browser