Questão 1
Questão
Identify the appropriate option to be used to ensure that the Selenium scripts stops if a check fails and doesnot run any subsequent checks.
i. Verify()
ii. Assert()
Responda
-
a. I and II
-
b. II
-
c. I
-
d. Neither I nor II
Questão 2
Questão
To run on Firefox browser, you must have which of the following?
Responda
-
a. FirefoxDriver is installed, similar to IEDriver and ChromeDriver Setup
-
b. Only Firefox browser is installed
-
c. Firefox plug-ins are installed
-
d. Both FirefoxDriver and Firefox browser are installed
Questão 3
Questão
Which of the following is the correct option to close all the opened browser sessions at one step?
Responda
-
a. driver.exit()
-
b. driver.quit()
-
c. driver.closeAll()
-
d. driver.close()
Questão 4
Questão
Which of the following is the best option for selenium to test an asynchronous webpage?
Responda
-
a. Sleep
-
b. Explicit Wait
-
c. Fluent Wait
-
d. Implicit Wait
Questão 5
Questão
Identify the correct command which “verifies an expected UI element, as defined by its HTML Tag and checks for its presence alone rather than its content.”
Responda
-
a. Verify Text
-
b. VerifyTextPresent
-
c. VerifyElementPresent
-
d. All the Listed option
Questão 6
Questão
6. Which of the Following functionality is NOT supported by Selenium IDE?
Questão 7
Questão
Firefox Driver is capable of being run and is tested on which of the following operating Systems?
Questão 8
Questão
Identify the Correct XPath for the Submit button
Responda
-
a. //div[(contains(@class ‘submit’))]
-
b. //div[contains(@class, ‘submit’)]
-
c. //div[@contains(class, ‘submit’)]
-
d. //div[contains(@class ‘submit’)]
Questão 9
Questão
In WebDriver, which of the following is valid select statement that selects a value from a drop down element?
Questão 10
Questão
Identify the correct code snippet to switch between different windows
Responda
-
a. driver.switchTo().window(Integer);
-
b. driver.switchTo().window(Array);
-
c. driver.switchTo().window(String);
-
d. driver.switchTo().window(ArrayList);
Questão 11
Questão
We generally use Listener to generate log events. Identify the correct selenium component that support listeners.
Questão 12
Questão
Which of the following is used to toggle a checkbox in a web form? Select One or More:
Responda
-
a. Element.set();
-
b. Element.click();
-
c. Element.toggle();
-
d. Element.Select();
Questão 13
Questão
13. Identify the correct code snippet which cannot refresh the webpage from the following options:
i. driver.get(driver.getCurrentURL());
ii. driver.navigate().to(driver.getCurrentURL());
iii. driver.findElement(By.xpath(“//h1[@class=’title’]”)).sendkeys(keys.F5);
iv. driver.open(driver. getCurrentURL());
Select One:
Responda
-
a. I and II
-
b. IV
-
c. III
-
d. I,II,III and IV
Questão 14
Questão
Which of the following is the correct “Webdriver” Command to “delete all cookies in the browser”?
Responda
-
a. driver.manage().deleteAllCookies();
-
b. driver. deleteCookies();
-
c. driver.deleteAllCookies();
-
d. driver.manage().deleteCookies();
Questão 15
Questão
Identify the correct statements about “Desired Capabilities” from the following. Select one or more
Responda
-
a. To execute multiple test cases on multiple systems with different browsers with different version and different operating System
-
b. Desired Capabilities class is used while working with Selenium Grid
-
c. Desired Capabilities class is used to handle page synchronization
-
d. All of the listed options
Questão 16
Questão
16. Which command should be used to ensure Selenium applies wait time of all UI elements in the scripts?
Responda
-
a. Sleep
-
b. Explicit Wait
-
c. Fluent Wait
-
d. Implicit Wait
Questão 17
Questão
Which of the following Selenium API enables running Selenium 1.0 test in Web driver?
Questão 18
Questão
Identify the appropriate Test Frameworks supported by Selenium Webdriver
Questão 19
Questão
How to retrieve Text from Alert pop up window?
Responda
-
a. Alert alert = driver.switchalert(); String alerttext = alert.getvalue(text);
-
b. Alert alert = driver.switchTo().alert; String alerttext = alert.getText(text);
-
c. Alert alert = driver.alert; String alerttext = alert.getText(text);
-
d. Alert alert = driver.switchalert; String alerttext = alert.getText(text);
Questão 20
Questão
20. Identify the correct code snippet to parameterize the Xpath:
“//*[@id=xxxxx]/a[2]/span/span[2]”. So that the “xxxxx” can be parameterize and the test can be executed with multiple test data
Responda
-
a. //*[@id=”+paraValue+”]/a[2]/span/span[2]
-
b. //*[starts-with(@id=”+paraValue+”)]/a[2]/span/span[2]
-
c. //*[contains(@id=”+paraValue+”)]/a[2]/span/span[2]
-
d. //*[@id=+”””+paraValue+”]”/a[2]/span/span[2]
Questão 21
Questão
21. Which of the following should be used to distribute tests on multiple machines, so that test can be run parallel to each other?
Responda
-
a. Selenium Webdriver
-
b. Selenium RC
-
c. Selenium IDE
-
d. Selenium Grid
Questão 22
Questão
22. Identify the correct code snippet to execute java script through Selenium webdriver
Responda
-
a. JavaScriptExecutor js = (JavaScriptExecutor)driver; String title = (string)js.executeScript(“Pass your Java Script”);
-
b. JavaScriptExecutor js = (JavaScriptExecutor)Webbrowser; String title = (string)js.executeScript(“Pass your Java Script”);
-
c. JavaScriptExecutor js = (JavaScriptExecutor)Webbrowser; String title = (string)js.execute(“Pass your Java Script”);
-
d. JavaScriptExecutor js = (JavaScriptExecutor)driver; String title = (string)js.execute (“Pass your Java Script”);
Questão 23
Questão
Identify the incorrect statement about “Implicit wait” from the following options:
Responda
-
a. An implicit wait is the code you define to wait for a certain condition to occur before proceeding further in the code
-
b. Once set, the implicit wait is the set for the life of the WebDriver object instance
-
c. To instruct WebDriver to poll the DOM for a certain amount of time when trying to find an element.
-
d. The default implicit wait setting is 0
Questão 24
Questão
Which of the following is the correct WebDriver statement to retrieve the row count of a table?
Responda
-
a. driver.findElements(By.xpath(“//table[@id=’tableD’]/tr”)).getrowcount();
-
b. All the Listed options
-
c. driver.findElements(By.xpath(“//table[@id=’tableD’]/tr”)).getcount();
-
d. Driver.findElements(By.xpath(“//table[@id=’tableD’]/tr”)).size();
Questão 25
Questão
25. Identify the correct code about the following code snippet:
MyClass c1,c2,c3;
C1 = new MyClass();
C3 = new MyClass();
Select One:
Responda
-
a. Only 3 objects are created c1,c2 and c3
-
b. Only 2 objects are created c1 and c3. The reference C2 is initialized
-
c. Only 2 objects are created c1 and c2. The reference C3 is only declared and not initialized
-
d. Only 2 objects are created c1 and c3. The reference C2 is only declared and not initialized
Questão 26
Questão
If you want to automate workflow that have to go through windows authentication dialog box, which additional libraries would you choose?
Questão 27
Questão
Identify the correct code snippet to double click an element using selenium, from the following:
Responda
-
a. WebElement el = driver.findElement(by.id(“ElementID”));Actions builder = new Actions(driver); builder.doubleclick(el).build();
-
b. WebElement el = driver.findElement(by.id(“ElementID”));Actions builder = new Actions(driver); builder.doubleclick().build().perform();
-
c. WebElement el = driver.findElement(by.id(“ElementID”));Actions builder = new Actions(driver); builder.doubleclick().build();
-
d. WebElement el = driver.findElement(by.id(“ElementID”));Actions builder = new Actions(driver); builder.doubleclick(el).build().perform();
Questão 28
Questão
Identify the incorrect URL related to Grid console, from the following
Responda
-
a. http://localhost.portno/console/grid
-
b. http://localhost.portno
-
c. http://localhost.portno/ grid
-
d. http://localhost.portno/grid/console
Questão 29
Questão
Identify the correct statement from the following
I. “Wait” is called an object, not a thread
II. “Sleep” sends the current thread into “not runnable” state for some time
Responda
-
a. I
-
b. I and II
-
c. II
-
d. Neither I nor II
Questão 30
Questão
Identify the steps to instantiate the chrome driver in correct sequence:
Responda
-
a. 1.Using System Property set method get the path of the Chrome Driver2.Set the Capabilities of the Chrome browser3.Open a URL4. Initialize chrome driver object with capabilities object as argument
-
b. 1.Using System Property set method get the path of the Chrome Driver2.Set the Capabilities of the Chrome browser3. Initialize chrome driver object with capabilities object as argument4.Open a URL
-
c. 1. Set the Capabilities of the Chrome browser2. Initialize chrome driver object with capabilities object as argument3. Using System Property set method get the path of the Chrome Driver4.Open a URL
-
d. 1.Using System Property set method get the path of the Chrome Driver2. Initialize chrome driver object with capabilities object as argument 3.Open a URL4. Set the Capabilities of the Chrome browser
Questão 31
Questão
Identify the command which is used to pause execution until the page is loaded completely
Responda
-
a. WaitForWindowToLoad
-
b. waitForPage
-
c. WaitForElementPresent
-
d. waitForPageToLoad
Questão 32
Questão
32. Which of the following is correct command to enter a value in a textbox?
Responda
-
a. None of the listed options
-
b. WebElement element = driver.findElement(By.name(“q”));element.sendkeys(“Cheese!”);
-
c. WebElement element = driver.findElement(By.name(“q”));element.setval(“Cheese!”);
-
d. WebElement element = driver.findElement(By.name(“q”));element.type(“Cheese!”);
Questão 33
Questão
What is the keyword used in Selenium for dealing with Regular Expressions?
Responda
-
a. RegularExp
-
b. RegEx
-
c. @regular
-
d. Regexp
Questão 34
Questão
Identify the correct statements about the code snippet given below:
Wait<WebDriver> wait = new FluentWait<WebDriver>(driver)
.withTimeouts(30, SECONDS)
.pollingEvery(30, SECONDS)
WebElement foo = wait.until(new function<WebDriver,WebElement>()
{
Public WebElement apply (WebDriver, driver)
{
Return driver.findElement(By.id(“foo”));
}
});
Select One or More
Responda
-
a. NosuchElementException is ignored automatically
-
b. Checks for the object once every 5 seconds
-
c. A combination of fluent wait and Implicit wait
-
d. Additional step needed to ignore NosuchElementException
Questão 35
Questão
You are writing scripts for web application automation using Selenium WebDriver. When you try to close the browser you get a popup saying “Are You Sure? The page is asking you to confirm that you want to leave – data entered will be lost. “The page has two buttons, Leave page and stay on page. Which function from the Alert API needs to be called if leave page needs to be selected?
Responda
-
a. alert.accept();
-
b. alert.close();
-
c. alert.Submit();
-
d. alert.click(1);
Questão 36
Questão
A script requires that you open the home page url, right click on a link, choose a context menu item in New tab. Which method will be useful for this operation?
Responda
-
a. ARROW_DOWN and ENTER with sendkeys
-
b. CONTEXT_CLICK method in sendkeys
-
c. RIGHT_CLICK with sendkeys
-
d. SELECT_ITEM(n) in sendkeys
Questão 37
Questão
Which building a JAR, what is/are the role(s) of a manifest file? Select One Or More
Responda
-
a. Setting an application’s entry point
-
b. Sealing packages within a JAR File
-
c. Enhancing security with manifest attributes
-
d. Setting package version information
Questão 38
Questão
Exception handling is targeted at:
Responda
-
a. Compile time error
-
b. logical error
-
c. Run time error
-
d. logging error
Questão 39
Questão
What is the method to simulate the right click event on an element in the application under test using C#.Net implentation?
Responda
-
a. ContextClick method
-
b. KeyPress method
-
c. Rightclick method
-
d. Keydown method
Questão 40
Questão
An application developed needs to be checked in multiple browsers for compatibility. Which annotation would you use in TestNG to achieve this in parallel, and save time?
Responda
-
a. @BeforeTest
-
b. @Test
-
c. @BeforeSuite
-
d. @Parameters
Questão 41
Questão
Which is the folder in which default test reports are created by TestNG?
Responda
-
a. Test-output
-
b. Testoutput
-
c. Testout
-
d. TestNG-Testoutput
Questão 42
Questão
Which of the following Junit is recommended to declare the implicit wait statement?
Questão 43
Questão
Which of the following Junit annotation do we declare the command “driver.quit”
Responda
-
a. “@Test”
-
b. “@Before”
-
c. “@try”
-
d. “@After”
Questão 44
Questão
What happens when the application creates a Java Script alert during test case paly?
Questão 45
Questão
What should be used in Selenium to wait for some conditions such as “ElementsToBeClickable”
Responda
-
a. Sleep
-
b. Explicit Wait
-
c. Implicit Wait
-
d. Fluent Wait
Questão 46
Questão
The client environment has multiple operating system implementations and regression testing has to be done on all of them.What tool would you use for this scenario?
Responda
-
a. Selenium RC
-
b. Selenium Grid
-
c. SeleniumIDE
-
d. WebDriver
Questão 47
Questão
Which statement used to make selenium script to wait for page loading?
Responda
-
a. Elementstobepresent
-
b. PagetoLoad
-
c. PageExist
Questão 48
Questão
Which statement used to verify element is present rather than verifying its content
Responda
-
a. ElementToBePresent
-
b. TextToBePresent
-
c. VerifyText