New answers tagged

0

Selenium has two functions for locating via xpath. find_element_by_xpath which returns the first matching element or raises an exception if no matching elements are found. find_elements_by_xpath (note the 's' on the end of elements) which returns a list containing every matching element; which will be empty in the case of no matching elements. You're using ...


0

.text doesnt throw any exception it just retrieves what's present as the text content. If there is not content then it returns '' so try for i in rating: print(i.text if i.text!="" else "_")


0

I encountered this problem today, as well. The commands I use is: robot someTest.robot --variablefile /path/to/my/resource But it fails with: [ ERROR ] Parsing '--variablefile' failed: File or directory to execute does not exist. Try --help for usage information. But when I robot someTest.robot or ls /path/to/my/resource, I can run the test/check the file....


0

Well the answer was about as simple as they come... I wasn't in the active tab.The following code fixed it instantly driver.switch_to.window(driver.window_handles[2])


1

May be you need apply Explicit waits and try different xpath. Apply Wait like below and try: # Imports Required from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By wait = WebDriverWait(driver,30) deletebutton = wait.until(EC....


-1

While working in a professional testing company, we have developed test scripts for various applications which require handling alerts for camera and mic. You can resolve this issue by adding argument "use-fake-ui-for-media-stream" in your chrome option list. Attached is screenshot for your reference -


1

I am not familiar with Python, but I can make some suggestions. First, visit the Selenium documentation site. You can find examples and detailed documentation using Selenium with Python here. Next, to answer your specific question, instead of searching by class name, look for something that is unique to the item/s you are searching for. You may need to find ...


Top 50 recent answers are included