Selenium Level Knowledge Assessment

Beschreibung

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 von erick reyes, aktualisiert more than 1 year ago
erick reyes
Erstellt von erick reyes vor mehr als 7 Jahre
119
0

Zusammenfassung der Ressource

Frage 1

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

Frage 2

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

Frage 3

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

Frage 4

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

Frage 5

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

Frage 6

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

Frage 7

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

Frage 8

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

Frage 9

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

Frage 10

Frage
Using USAA framework which class extends to test classes?
Antworten
  • WebBaseTest
  • WebBasePage
  • BasePage
  • USAABaseTest

Frage 11

Frage
Using USAA framework what class extends to page classes?
Antworten
  • WebBasePage
  • WebBaseTest
  • USAABasePage
  • BasePage

Frage 12

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

Frage 13

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

Frage 14

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

Frage 15

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

Frage 16

Frage
Selenium can...
Antworten
  • Access controls within the desktop
  • Only test web applications
  • Both web and desktop applications

Frage 17

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

Frage 18

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

Frage 19

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

Frage 20

Frage
Assertions can be defined in Page classes?
Antworten
  • True
  • False

Frage 21

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

Frage 22

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

Frage 23

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

Frage 24

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

Frage 25

Frage
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>
Antworten
  • Volvo
  • Saab
  • Mercedes
  • All of the above
  • None of the above
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Deutsche Bundesländer und ihre Hauptstädte
max.grassl
Tipps zum Erstellen von Mindmaps
max.grassl
10 Lernmethoden
AntonS
Klausurfragen aktuell
Anne Malten
Klingel und Gleichstrommotor
Peter Kasebacher
BKF C95 (Fragen der Ziffern 1c, 1d)
Harald Koenig
Nathan der Weise Quiz
Laura Overhoff
Netzwerkdienste
DFairy
U6 Bildbearbeitung
Lena A.
METH STADA SS 2019
Caroline Hannah
Vetie Pharma Übungsfragen 2019/2020
Maite J