Interview Questions of Python selenium

Page 1

Interview Questions of Python

70-70-90-50-90 www.ducatindia.com
selenium

Q1) What is Selenium and what is composed of ?

Ans-Selenium is a suite of automated web testing resources.

Selenium IDE:

It is a recording and replay method. It is a Plugin for Firefox

WebDriver and RC:

It offers APIs for a number of languages, such as Java, .NET,

PHP, etc. The Webdriver and RC browsers work for most of them.

Q2) How Can we open Different browser using python? : Ans-For Firefox browser driver=webdriver.Firefox(“Path of Firefox Driver”) for IE browser driver=webdriver.Ie(“Path of IE Driver”) For Chrome browser driver=Webdriver.Chrome(“Path of Chromedriver”)

Q-3) Why you prefer to use Python for Selenium?

-Python is one of the easy-to-use programming languages and is not very big or complex. Python APIs allow us, via Selenium, to connect to the browser. In terms of the differences in browser architecture, Selenium can express normal Python commands to different browsers.

Ans
Q4) Why my pip is not working when my python setup is not installed properly? AnsExecutable path is not set correctly.

Q-5) Whats XPATH?

direction

the

markup

where the data is stored in XML format such as Key value pair.

is a tool for interacting with multiple browsers on the internet. And they monitor the script’s operation.

Ans-It is the
finder of
expandable
language
Q-6) What is a Webdriver? Ans-Selenium
Q-7) Explain how to assert text of webpage using selenium 2.0? Ans-WebElement el = driver.findElement(By.id(“ElementID”)) String text = el.getText(); Assert.assertEquals(“Element Text”, text); Q-8) Explain what is assertion in Selenium and what are the types of assertion? Ans-As a verification stage, statement is used. It verifies that the state of the request is in line with what is planned. Assert prove and waitFor are the types of assertion.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.