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() (B)</p> Signup and view all the answers

Which method is used to log out from SnapDeal?

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

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

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

Which method is used to accept an alert in SnapDeal?

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

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

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

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

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

Which method is used to close the browser in SnapDeal?

<p>close() (B)</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 (A)</p> Signup and view all the answers

What is the purpose of performing parallel execution in testing?

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

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

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

What does the TestNG.xml file contain?

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

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

<p>com.suite1 (A)</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 (C)</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 (D)</p> Signup and view all the answers

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

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

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

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

Which WebDriver is used in the 'Flipkart' class?

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

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

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

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

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

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

<p>name (B)</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' (C)</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 (B)</p> Signup and view all the answers

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

<p>1-10 (B)</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 (D)</p> Signup and view all the answers

Which attribute is used to run scripts parallel in TestNG?

<p>Parallel (B)</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 (B)</p> Signup and view all the answers

What is the purpose of TestNG?

<p>To execute multiple test suites in parallel (B)</p> Signup and view all the answers
Use Quizgecko on...
Browser
Browser