Pregunta 1
Pregunta
The following codes will print the page title?
System.out.println(driver.getTitle());
System.out.println(driver.findElement(By.tagName(“title”)).getText());
Pregunta 2
Pregunta
In WebDriver, which method closes the open browser?
Respuesta
-
close()
-
quit()
-
terminate()
-
shutdown()
Pregunta 3
Pregunta
In WebDriver, which of the following is a valid select statement that selects a value from a drop down element?
Respuesta
-
selectByIndex()
-
selectByValue()
-
selectByVisibleText()
-
All of the above
-
None of the above
Pregunta 4
Pregunta
Consider the following code snippet
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.presenceOfElementLocated(by));
This is an example of...
Respuesta
-
Explicit Wait
-
Implicit Wait
-
Fluent Wait
Pregunta 5
Pregunta
Which WebDriver method is used to change focus to an alert, a frame or a browser window?
Respuesta
-
switchTo()
-
changeTo()
-
setFocus()
-
changeFocus()
Pregunta 6
Pregunta
In WebDriver, which command takes you forward by one page on the browser’s history?
Respuesta
-
navigate().forward()
-
navigate.forward()
-
Navigate.forward()
-
navigate_forward()
Pregunta 7
Pregunta
In WebDriver, which command can be used to enter values onto text boxes? Select the best answer
Respuesta
-
sendKeys("text")
-
selenium.type()
-
driver.type("text")
-
sendKeys()
Pregunta 8
Pregunta
In WebDriver, which of the following commands retrieves the text of a html element?
Respuesta
-
getText()
-
selectText()
-
getElementText()
-
getText(WebElement)
Pregunta 9
Pregunta
In WebDriver, which method navigates to an URL?
Respuesta
-
get("url")
-
goToUrl("url")
-
navigate.to("url")
-
getUrl("url")
Pregunta 10
Pregunta
Using USAA framework which class extends to test classes?
Respuesta
-
WebBaseTest
-
WebBasePage
-
BasePage
-
USAABaseTest
Pregunta 11
Pregunta
Using USAA framework what class extends to page classes?
Respuesta
-
WebBasePage
-
WebBaseTest
-
USAABasePage
-
BasePage
Pregunta 12
Pregunta
which of the following annotations are used by JUnit ?
Respuesta
-
@After, @Before, @AfterClass, @Test, @BeforeClass
-
@AfterTest, @AfterMethod, @BeforeMethod, @Test, @BeforeTest
-
@Test, @Before, @After
-
None of the above
-
All of the above
Pregunta 13
Pregunta
what element will be selected using the next Xpath expression?
"//a[name='element1']/div/span/p"
Respuesta
-
a paragraph
-
a link
-
an image
-
none of above
Pregunta 14
Pregunta
According to POM, what does a page class contain?
Respuesta
-
Actions
-
Services
-
Page Elements
-
All of the above
-
None of the above
Pregunta 15
Pregunta
In log4j, which of the following methods is valid to generate a log?
Respuesta
-
info()
-
fatal()
-
warn()
-
All of the above
-
None of the above
Pregunta 16
Respuesta
-
Access controls within the desktop
-
Only test web applications
-
Both web and desktop applications
Pregunta 17
Pregunta
What element will be selected with the following statement?
driver.findElement(By.cssSelector("#name"));
<div>
<span id=”name”>Name 1</span>
<span class="name">Name 2</span>
</div>
Pregunta 18
Pregunta
How to create an instance of WebDriver in Java?
Respuesta
-
WebDriver driver = FirefoxDriver();
-
WebDriver = new FirefoxDriver();
-
WebDriver driver = CreateObject FirefoxDriver();
-
WebDriver driver = new FirefoxDriver();
Pregunta 19
Pregunta
in JUnit, @Before annotation will execute the method for every @Test methods in the test class?
Pregunta 20
Pregunta
Assertions can be defined in Page classes?
Pregunta 21
Pregunta
Select an option which is NOT a type of locators.
Respuesta
-
id
-
className
-
xpath
-
cssSelector
-
style
Pregunta 22
Pregunta
Which of the following options is declaring an implicit wait?
Respuesta
-
webDriver.manage().timeouts.implicitlyWait(10, TimeUnit.SECONDS)
-
WebDriverWait wait = new ImplicitWaitTime();
wait.implicitWait(10, TimeUnit.SECONDS);
-
webDriver.implicitWaitTime().setExplicitTime(driver, 10);
-
ImpicitWait = webDriver.timeOuts().setExplicitWait(10, TimeUnit.SECONDS )
Pregunta 23
Pregunta
Extending from WebBasePage to page class, you need to implement...
(select all the applicable)
Pregunta 24
Pregunta
What element can be manipulate using "Select" class?
Respuesta
-
Dropdown lists
-
Check boxes
-
Radio button
-
Buttons
-
Text box areas
Pregunta 25
Pregunta
Which element will be selected with the following instructions?
Select option = new Select(driver.findElementBy.name("list"));
option.deselectByVisibleText("Saab");
<select name="list">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
</select>
Respuesta
-
Volvo
-
Saab
-
Mercedes
-
All of the above
-
None of the above