101 |
Which of the following WebDriver methods is used to select the option at a given index? |
selectIndex()
selectedByIndex()selectByIndex()selectByIndexes() |
selectByIndex() |
102 |
What type of Wait objects keep alive until the WebDriver object dies? |
Implicit WaitFluent WaitExplicit Wait All of the above |
Implicit Wait |
103 |
Which of the following WebDriver methods is used to clear all selected entries? |
deselectAll()dselect_All()deselect_All()dselectAll() |
deselectAll() |
104 |
Which of the following parameters is not required to initialize Fluent wait? |
The frequency to check the success or failure of a specified condition.The maximum amount of time to wait for a condition.Exception classes to ignore while waiting.Expected condition to wait. |
Expected condition to wait. |
105 |
Which of the following steps is not mandatory to launch Firefox in Selenium 3? |
DesiredCapabilities caps = new DesiredCapabilities();caps.setCapability("marionette", true);WebDriver driver = new FirefoxDriver();driver.get("http://www.google.com"); |
driver.get("http://www.google.com"); |
106 |
TestNG doesn’t make it mandatory to declare @BeforeClass and @AfterClass, which is present in JUnit. Is it true or false? |
falsetruenoneall |
true |
107 |
TestNG framework allows us to generate test reports in both HTML and XML formats. Is it true or false? |
falsetruenoneall |
true |
108 |
Which of the following is not a valid TestNG annotation? |
@AfterSuite@DataSource@Parameters@BeforeSuite |
@DataSource |
109 |
TestNG has a more elegant way of handling parameterized tests with the data-provider concept. Is it true or false? |
truefalsenoneall |
true |
110 |
Which of the following features TestNG doesn’t support? |
Supports dependent methods testing.Support for parameters.Supports powerful execution model.None |
None |
111 |
Which is not a valid setUp/tearDown level in TestNG framework? |
@Before/AfterTest@Before/AfterSuite@Before/AfterClass@Before/AfterGroup |
@Before/AfterClass |
112 |
What is the correct way to exclude a test in TestNG? |
Using @Test(include = false) annotation.Using @Test(exclude = true) annotation.NoneUsing @Test(enabled = false) annotation. |
Using @Test(enabled = false) annotation. |
113 |
Which of the following statements is false in the context of TestNG framework? |
TestNG permits to define the dependent test cases. Each test case is independent of other test cases.
The @DataProvider annotation accepts single string attribute and yields back an array of objects. None |
None |
114 |
Parallel execution of Selenium test cases is possible in TestNG. Is it true or false? |
falsetruenoneall |
true |
115 |
Which of the following is not a valid technical challenge with Selenium? |
It depends on third party tools for reporting purpose.It does not support the Bitmap comparison.Selenium IDE supports only Firefox browser.Selenium supports only web based applications. |
Selenium IDE supports only Firefox browser. |
116 |
Why should a software tester opt for the Selenium and not QTP? |
Selenium is designed for web based testing while QTP is more of a desktop app testing tool.AllSelenium supports Firefox/IE/Opera/Safari and OS like Windows/Mac/Linux whereas QTP works with Internet Explorer on Windows.Selenium is an open source whereas QTP is a commercial tool. |
All |
117 |
Selenium can’t handle Window based popups. Is it true or false? |
truefalsenoneall |
true |
118 |
Which of the following is a valid difference between type keys and type commands? |
typeKeys() simulates keystrokes for typing whereas type() takes the entire string and puts it in there at one time.type() will trigger JavaScript event in most of the cases whereas typeKeys() won’t. noneall |
typeKeys() simulates keystrokes for typing whereas type() takes the entire string and puts it in there at one time. |
119 |
How to login into a site if it’s displaying authentication popup for password and username? |
http://username@url:passwordhttp://url@username:passwordhttp://username:password@urlNone |
http://username:password@url |
120 |
Which of the following is not a valid difference between setSpeed() and sleep() methods? |
sleep() takes a long parameter whereas the setSpeed() accepts only String argument.sleep() will stop the current thread for the specified period of time whereas setSpeed() will stop the execution of every selenium command.sleep() enforces the delay for a single time whereas the setSpeed() causes each command to obey the delay specified.None |
None |
121 |
Which of the following is a valid difference between single and double slash in XPath? |
Single slash ( / ) enables to create ‘relative’ path expressions whereas double slash ( // ) allows you to create ‘absolute’ path expressions. Single slash ( / ) starts selection from the document node whereas double slash ( // ) starts selection matching anywhere in the document. noneall |
Single slash ( / ) starts selection from the document node whereas double slash ( // ) starts selection matching anywhere in the document. |
122 |
Which of the following is a valid difference between and commands? |
command checks whether an element is on the page or not and stops the test on failure whereas command carries on executing the tests. command checks the visibility of element whereas command tests the condition for true or false. noneall |
command checks whether an element is on the page or not and stops the test on failure whereas command carries on executing the tests. |
123 |
The “Same Origin Policy” enforces security. It ensures that the content of your site will never be accessible by a script from another site. Is it true or false? |
falsetruenoneall |
true |
124 |
When should you use Selenium Grid? |
To support parallel execution of same/different tests in the different browsers.To support parallel execution of different tests in the same browser.To support parallel execution of same tests in the same browser.To support parallel execution of same/different tests in the same browser. |
To support parallel execution of same/different tests in the different browsers. |