Selenium Level Knowledge Assessment

Description

This test will provide information an auto-evaluation based on previous Selenium courses and knowledge acquired through professional experience. The main objective will be measure the level individually using Selenium WebDriver with Java.
erick reyes
Quiz by erick reyes, updated more than 1 year ago
erick reyes
Created by erick reyes almost 7 years ago
111
0

Resource summary

Question 1

Question
The following codes will print the page title? System.out.println(driver.getTitle()); System.out.println(driver.findElement(By.tagName(“title”)).getText());
Answer
  • True
  • False

Question 2

Question
In WebDriver, which method closes the open browser?
Answer
  • close()
  • quit()
  • terminate()
  • shutdown()

Question 3

Question
In WebDriver, which of the following is a valid select statement that selects a value from a drop down element?
Answer
  • selectByIndex()
  • selectByValue()
  • selectByVisibleText()
  • All of the above
  • None of the above

Question 4

Question
Consider the following code snippet WebDriverWait wait = new WebDriverWait(driver, 30); wait.until(ExpectedConditions.presenceOfElementLocated(by)); This is an example of...
Answer
  • Explicit Wait
  • Implicit Wait
  • Fluent Wait

Question 5

Question
Which WebDriver method is used to change focus to an alert, a frame or a browser window?
Answer
  • switchTo()
  • changeTo()
  • setFocus()
  • changeFocus()

Question 6

Question
In WebDriver, which command takes you forward by one page on the browser’s history?
Answer
  • navigate().forward()
  • navigate.forward()
  • Navigate.forward()
  • navigate_forward()

Question 7

Question
In WebDriver, which command can be used to enter values onto text boxes? Select the best answer
Answer
  • sendKeys("text")
  • selenium.type()
  • driver.type("text")
  • sendKeys()

Question 8

Question
In WebDriver, which of the following commands retrieves the text of a html element?
Answer
  • getText()
  • selectText()
  • getElementText()
  • getText(WebElement)

Question 9

Question
In WebDriver, which method navigates to an URL?
Answer
  • get("url")
  • goToUrl("url")
  • navigate.to("url")
  • getUrl("url")

Question 10

Question
Using USAA framework which class extends to test classes?
Answer
  • WebBaseTest
  • WebBasePage
  • BasePage
  • USAABaseTest

Question 11

Question
Using USAA framework what class extends to page classes?
Answer
  • WebBasePage
  • WebBaseTest
  • USAABasePage
  • BasePage

Question 12

Question
which of the following annotations are used by JUnit ?
Answer
  • @After, @Before, @AfterClass, @Test, @BeforeClass
  • @AfterTest, @AfterMethod, @BeforeMethod, @Test, @BeforeTest
  • @Test, @Before, @After
  • None of the above
  • All of the above

Question 13

Question
what element will be selected using the next Xpath expression? "//a[name='element1']/div/span/p"
Answer
  • a paragraph
  • a link
  • an image
  • none of above

Question 14

Question
According to POM, what does a page class contain?
Answer
  • Actions
  • Services
  • Page Elements
  • All of the above
  • None of the above

Question 15

Question
In log4j, which of the following methods is valid to generate a log?
Answer
  • info()
  • fatal()
  • warn()
  • All of the above
  • None of the above

Question 16

Question
Selenium can...
Answer
  • Access controls within the desktop
  • Only test web applications
  • Both web and desktop applications

Question 17

Question
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>
Answer
  • CSS selector syntax is incorrect
  • Output is "Name 2"
  • Output is "Name 1"
  • NoSuchElementException

Question 18

Question
How to create an instance of WebDriver in Java?
Answer
  • WebDriver driver = FirefoxDriver();
  • WebDriver = new FirefoxDriver();
  • WebDriver driver = CreateObject FirefoxDriver();
  • WebDriver driver = new FirefoxDriver();

Question 19

Question
in JUnit, @Before annotation will execute the method for every @Test methods in the test class?
Answer
  • True
  • False

Question 20

Question
Assertions can be defined in Page classes?
Answer
  • True
  • False

Question 21

Question
Select an option which is NOT a type of locators.
Answer
  • id
  • className
  • xpath
  • cssSelector
  • style

Question 22

Question
Which of the following options is declaring an implicit wait?
Answer
  • 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 )

Question 23

Question
Extending from WebBasePage to page class, you need to implement... (select all the applicable)
Answer
  • a constructor
  • waitForPageLoad method
  • isElementPresent method
  • Web Driver
  • DataHandler class
  • log4j to Logging the actions

Question 24

Question
What element can be manipulate using "Select" class?
Answer
  • Dropdown lists
  • Check boxes
  • Radio button
  • Buttons
  • Text box areas

Question 25

Question
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>
Answer
  • Volvo
  • Saab
  • Mercedes
  • All of the above
  • None of the above
Show full summary Hide full summary

Similar

French Intermediate
PatrickNoonan
Art Movements
Julia Lee
Romeo and Juliet essay
Tambo234
MODE, MEDIAN, MEAN, AND RANGE
Elliot O'Leary
Jung Quiz
katprindy
Vectors
Andrea Leyden
Physics: Energy resources and energy transfer
katgads
Geography: Population
ameliaalice
GCSE Chemistry C4 (OCR)
Usman Rauf
Basic English tenses
Mariola Hejduk
Which GoConqr Product is Right for Me?
Sarah Egan