30 Questions
Which programming language is used in the provided code?
Java
What is the purpose of the 'login' method in the 'SnapDeal' class?
To log in to the SnapDeal website
What is the purpose of the 'searchAndSelectProduct' method in the 'SnapDeal' class?
To search for a product
What is the purpose of the 'buyAndRemoveFromCart' method in the 'SnapDeal' class?
To add a product to the cart and remove it
What is the purpose of the 'logout' method in the 'SnapDeal' class?
To log out of the SnapDeal website
What is the purpose of the 'quit' method in the 'SnapDeal' class?
To close the browser
What is the purpose of the 'init' method in the 'SnapDeal' class?
To initialize the WebDriver
What is the purpose of the 'click' method in the provided code?
To click on an element
What is the purpose of the 'sendKeys' method in the provided code?
To enter text in an input field
What is the purpose of the 'accept' method in the provided code?
To accept an alert
Which type of execution can help reduce the 'execution time' of tests in TestNG?
Parallel execution
What is the purpose of a TestNG.xml file in TestNG?
To configure test execution
How many packages are created in the example project mentioned in the text?
2
What is the purpose of the Flipkart.java class in the example project?
To create test cases for Flipkart
What is the purpose of the Snapdeal.java class in the example project?
To create test methods for Snapdeal
What is the purpose of the @BeforeClass annotation in TestNG?
To execute a method before the test class
What is the purpose of the @Test annotation in TestNG?
To mark a method as a test method
Which method is used to maximize the browser window in the Flipkart.java class?
driver.manage().window().maximize()
Which method is used to wait for an element to be present in the Flipkart.java class?
driver.findElement(By.id("elementId")).waitForElementVisible()
What is the purpose of the Actions class in the Flipkart.java class?
To perform mouse and keyboard actions
Which attribute is used to log the execution details in the console in TestNG?
verbose
What is the default value for the 'Parallel' attribute in TestNG?
none
What is the purpose of the 'name' attribute in TestNG?
To specify the name of the test suite
Which option is used to specify the type of parallel execution in TestNG?
suites
What is the purpose of the 'thread-count' attribute in TestNG?
To specify the number of threads for parallel execution
What is the purpose of the 'verbose' attribute in TestNG?
To log the execution details in the console
What is the value range for the 'verbose' attribute in TestNG?
1-10
What is the purpose of executing multiple test suites in parallel in TestNG?
To save time by running tests concurrently
What should be done to execute multiple test suites in parallel in TestNG?
Specify the 'Parallel' attribute in the testng.xml file
What does TestNG provide to execute multiple tests in parallel in a single configuration file?
Test suites
TestNG: Running Multiple Test Classes in Parallel with TestNG.xml
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free