I’m using Selenium WebDriver using Python for UI tests and I want to check the following HTML: From this unordered list I want to loop over the elements and check the text in them. I selected the ul-element by its id, but I can’t find any way to loop over the <li>-children in Selenium. Does anybody know how you can
Tag: selenium-webdriver
How to find parent elements by python webdriver?
Is there any methods for python+selenium to find parent elements, brother elements, or child elements just like driver.find_element_parent? or driver.find_element_next? or driver.find_element_previous? eg: I’ve tried like below, but fail: How can I get the parent of input element and then, finally, get the option selected? Answer You can find a parent element by using .. xpath: What about making a
How to use Selenium with Python?
How do I set up Selenium to work with Python? I just want to write/export scripts in Python, and then run them. Are there any resources for that? I tried googling, but the stuff I found was either referring to an outdated version of Selenium (RC), or an outdated version of Python. Answer You mean Selenium WebDriver? Huh…. Prerequisite: Install
How do I get current URL in Selenium Webdriver 2 Python?
I’m trying to get the current url after a series of navigations in Selenium. I know there’s a command called getLocation for ruby, but I can’t find the syntax for Python. Answer Use current_url element for Python 2: For Python 3 and later versions of selenium:
How to maximize a browser window using the Python bindings for Selenium 2-WebDriver?
I wanted to know how to maximize a browser window using the Python bindings for Selenium 2-WebDriver. Answer The trunk version has webdriver.set_window_position(), webdriver.set_window_size() methods: