1 / 27

Interview Questions of Python selenium

This Questions are helpful for your learning python and also crack your Interview. At Ducat, we give you advanced Python training under the guidance of largely educated coaches. Join our online and offline classes moment. <br>Call Us:- 70-70-90-50-90<br>EmailId:- www.ducatindia.com

Ducat3
Download Presentation

Interview Questions of Python selenium

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Interview Questions of Python selenium Join Advanced Python Course Enroll Now Call us: 70-70-90-50-90 www.ducatindia.com

  2. 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.

  3. Q2) Why my pip is not working when my python setup is not installed properly? Ans: Executable path is not set correctly.

  4. Q3) 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”)

  5. Q4) What are the different types of annotations which are used in Selenium? Ans: Following are the annotations are used in selenium: Test BeforeClass After Ignore Before AfterClass RunWith

  6. Q5) What is the commands for downloading selenium? Ans: pip install –U selenium sudo pip install python

  7. Q6) What are the different locators used? Ans: Class name id Tag name Name Partial link text CSS Selector XPath link text

  8. Q7) What is a locator? Ans: It is a web page element that the python script can communicate with via the selenium driver.

  9. Q8) What is a Webdriver? Ans: Selenium provides a tool for interacting with various browsers on the web. And they control the script’s operation.

  10. Q9) How to find element by hyperlink? Ans: Find_element_by_link_text(“text of that hyperlink”).click()

  11. Q10) What is pass in python. Ans: Pass means that there is no operation to do.

  12. Q11) Can we use selenium when the webpage and resource locater elements are changing frequently? Ans: never.

  13. Q12) What are the different Navigation oprations in selenium? Ans: used to refresh driver.refresh() used to navigate back driver.back() used to move forward driver.forward()

  14. Q13) What is the WebDriver used to run selenium script on chrome browser? Ans: chrome driver

  15. Q14) What is the use of automation testing? Ans: This will reduce manpower and thus reduce the amount of time we spend on manual inspection at all times.

  16. Q15) What is used to create unicode strings in Python language? Ans: Add u before the string u ‘mystring’

  17. Q16) Why you prefer to use Python for Selenium? Ans: 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.

  18. Q17) Which is the slowest locator? Ans: Xpath.

  19. Q18) When webpage is dynamic which element locater do we use to locate an element? Ans: driver.findElementByXpath()

  20. Q19) What is the difference between quit() and close() function of the web browser? Ans: Browser.quit() This feature manages the entire browser for all open windows and guarantees that the processes are closed and terminated properly without any memory leaks. Browser.close() The latest executing window will close and you can still turn to other window handles, even though the newly running window is locked.

  21. Q20) Whats XPATH? Ans: It is the direction finder of the expandable markup language where the data is stored in XML format such as Key value pair.

  22. Q21) What is a Webdriver? Ans: Selenium is a tool for interacting with multiple browsers on the internet. And they monitor the script’s operation.

  23. Q22) 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);

  24. Q23) What are the different types of drivers currently supported by Selenium Webdriver? Ans: The supported drivers are: Gecko driver ChromeDriver InternetExplorerDriver SafariDriver OperaDriver AndroidDriver IPhoneDriver HtmlUnitDriver.

  25. Q24) 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.

  26. Q25) What is the difference between verify and assert commands? 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. Ans: Verify:Q25) What is the difference between verify and assert commands? The Verify command tests if the object is on the page, and the test continues to run if it is not. In verification, even if every test fails, all the commands are expected to run. Assert: Assert helps you to verify whether or not an element exists on the page. If the proclaimed aspect is not available, the evaluation would end at the phase failed. In other words, at the point where the search fails, the evaluation will be terminated..

  27. ContactNo:- 70-70-90-50-90 Email Id:- www.ducatindia.com

More Related