Selenium WebDriver Test 1 β Questions and Answers
Question 1: What is the most significant change in Selenium 3.0?
- Selenium WebDriver Test
- Dropping Selenium Core
- Making Webdriver as W3C specification
- All of the above (Correct answer)
Correct answer: All of the above
Explanation: <br> The most significant change is the replacement of the core with the back-end WebDriver. The W3C (World Wide Web Consortium) has approved Selenium 3.0 as a standard. In addition, Selenium 3 is expected to be a popular software testing tool for both online and mobile applications.
Question 2: _____________ is the WebDriver command for entering text into a textbox.
- driver.type()
- type()
- selenium.type()
- sendKeys("text) (Correct answer)
Correct answer: sendKeys("text)
Explanation: <br> The sendKeys approach is mostly used to organize content into an editable format. The sendKeys pattern code is: 1. 2. sendkeys("Free Selenium Coaching"), driver.findElement(By.title("q"));
Question 3: Cookies are accessed via which method?
- Fetch
- fetchCookie
- getCookie (Correct answer)
- Cookie
Correct answer: getCookie
Explanation: <br> The CookieContainer object of the WebRequestHandler is used to access the cookie sent by the Web API controller. The Count property of the CookieContainer returns the total number of cookies in the container. The container's server cookie is retrieved using the GetCookies () method.
Question 4: The Selenium Web Driver supports the language ___________
- COBOL
- PERL (Correct answer)
- SQL
- ASP
Correct answer: PERL
Explanation: <br> C#, Java, Perl, PHP, Python, and Ruby are some of the languages WebDriver supports. You should have a good understanding of any of the supported programming languages before diving into Selenium WebDriver fundamentals. Currently, Java and C# are the most common Selenium Web driver platforms.
Question 5: In a Java project, which data surface is used by Chromedriver to deliver chromeOptions?
- Map (Correct answer)
- Array
- String
- Tree
Correct answer: Map
Explanation: <br> The correct answer is Map
Question 6: To delete a cookie, what are the two parameters required by the deleteCookie method?
- Insufficient Data
- The first parameter is where it is created, and the second parameter is the name of the cookie
- The first parameter is the name of the cookie, and the second parameter is where it was created (Correct answer)
- None of the above
Correct answer: The first parameter is the name of the cookie, and the second parameter is where it was created
Explanation: <br> To delete a specific cookie, use the deletecookie method. Delete cookie(para1,para2) defines the DeleteCookie method; the first parameter is the cookie's name, and the second parameter is the cookie's path.
Question 7: In Selenium Webdriver, what is the value of the parameter given to the click function?
- value -1
- value 0
- value 1
- None of the above (Correct answer)
Correct answer: None of the above
Explanation: <br> The correct answer None of the above
Question 8: Selenium HQ does not develop which of the following language bindings?
- JavaScript(node)
- Ruby
- Perl (Correct answer)
- Python
Correct answer: Perl
Explanation: <br> Perl language bindings are developed by third parties and are NOT developed by seleniumhq. A third party provides Perl bindings.
Question 9: Selenium WebDriver does not support which of the following programming languages?
- Python
- ASP.NET (Correct answer)
- C#
- JavaScript
Correct answer: ASP.NET
Explanation: <br> ASP.NET is a server-side web application framework that allows you to create dynamic web pages. It's free and open-source.
What is the most significant change in Selenium 3.0?