TestNG
30 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 method is used to navigate to the SnapDeal URL?

  • sendKeys()
  • quit()
  • click()
  • navigate() (correct)
  • Which method is used to log in to Flipkart?

  • login() (correct)
  • init()
  • sendKeys()
  • click()
  • Which method is used to search for a product in SnapDeal?

  • searchAndSelectProduct() (correct)
  • click()
  • quit()
  • sendKeys()
  • Which method is used to buy and remove a product from the cart in SnapDeal?

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

    Which method is used to log out from SnapDeal?

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

    Which method is used to maximize the browser window in SnapDeal?

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

    Which method is used to accept an alert in SnapDeal?

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

    Which method is used to switch to a frame in SnapDeal?

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

    Which method is used to perform a mouse hover action in SnapDeal?

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

    Which method is used to close the browser in SnapDeal?

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

    Which tool enables you to run test methods, test classes, and test cases in parallel inside your project?

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

    What is the purpose of performing parallel execution in testing?

    <p>To reduce execution time</p> Signup and view all the answers

    What is the first step in running multiple classes using TestNG?

    <p>Create a TestNG.xml file</p> Signup and view all the answers

    What does the TestNG.xml file contain?

    <p>All of the above</p> Signup and view all the answers

    Which package should the class 'Flipkart' be placed in?

    <p>com.suite1</p> Signup and view all the answers

    What is the purpose of the 'init()' method in the 'Flipkart' class?

    <p>To maximize the browser window</p> Signup and view all the answers

    What is the purpose of the 'login()' method in the 'Flipkart' class?

    <p>To log in to Flipkart</p> Signup and view all the answers

    Which method is annotated with '@BeforeClass' in the 'Flipkart' class?

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

    Which method is annotated with '@Test' in the 'Flipkart' class?

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

    Which WebDriver is used in the 'Flipkart' class?

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

    Which attribute is used to log the execution details in the console in TestNG?

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

    What is the default value of the 'Parallel' attribute in TestNG?

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

    Which attribute is used to specify the name of the test suite in TestNG?

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

    How can you execute multiple test suites in parallel using TestNG?

    <p>By setting the 'Parallel' attribute to 'suites'</p> Signup and view all the answers

    What is the purpose of the 'thread-count' attribute in TestNG?

    <p>To execute scripts in parallel or sequential order</p> Signup and view all the answers

    What is the range of values for the 'verbose' attribute in TestNG?

    <p>1-10</p> Signup and view all the answers

    What is the purpose of the 'name' attribute in TestNG?

    <p>To specify the name of the test suite</p> Signup and view all the answers

    Which attribute is used to run scripts parallel in TestNG?

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

    What happens when you increase the value of the 'verbose' attribute in TestNG?

    <p>The execution details in the console become more detailed and clearer</p> Signup and view all the answers

    What is the purpose of TestNG?

    <p>To execute multiple test suites in parallel</p> Signup and view all the answers

    Use Quizgecko on...
    Browser
    Browser