1
vote
1answer
9 views

Getting multiple url? Is this possible in Selenium

I have list of urls for which I want to write a small Smoke test. Just load the urls and assert the title to make sure they are alive. Is this possible to do? class identity(unittest.TestCase): ...
0
votes
1answer
5 views

WebDriverException: Message: 'ChromeDriver executable needs to be available in the path

Every time I run my python algorithm I am getting this error in cmd: Traceback (most recent call last): File "newScrape.py", line 1, in <module> import SScraper as SS File ...
0
votes
1answer
20 views

set_preference does not work on FireFox profile

I have a python script which is trying to download an excel file automatically. I've tried to address firefox profile directly and it works fine: path = '\\path\\to\\firefox\\default\\profile\\' fp = ...
0
votes
1answer
28 views

Selenium Python right click “Open link in new Window” - (Windows 7)

Description of my web page: When I enter some details on my web Page it shows up couple of different links. Out of that links, I need to click on one link and continue my testing from there on. ...
0
votes
1answer
15 views

Extracting data from a find_element query (Python)

So I'm trying to extract certain data from within a find_element search quest1 = browser.find_element_by_id("a29081363") quest1.title = browser.find_element_by_class_name("title").text quest1.desc = ...
0
votes
1answer
8 views

How to load HtmlUnit driver in Selenium webdriver using Python bindings?

I pulled this Python code from Selenium IDE export option and I replaced self.driver = webdriver.Firefox() with HtmlUnitDriver() but it doesn't work since I have an error : AttributeError: 'module' ...
0
votes
1answer
33 views

Python Selenium - Common Script for Chrome, Firefox & IE

We are currently investigating Selenium as a test tool for web servers embedded in a range of controllers. I was hoping to reuse the same Python (2.7) code for all drivers but although Chrome and ...
0
votes
0answers
34 views

Selenium Webdriver Timeout exception handling

I've traditionally seen timeout handling like this: from socket import timeout try: #something except timeout: #something else I am having web driver timeout exceptions however I can't seem to ...
-1
votes
0answers
24 views

webdriver click on an element with python error

I am trying to click an element in Selenium. my python code: selected_map = u"Brazília térkép" driver.find_element_by_xpath("//*[contains(text(), '" + selected_map + "')]").click() I got the ...
0
votes
1answer
32 views

driver.get() takes too long to finish, How can I set a timeout method to deal with it?

A website I need to test usually takes much time to load, I don't want to wait when I need to test it, so I spend almost a whole day in searching answers from the Internet. However, I still not ...
1
vote
1answer
26 views

Selenium webdriver with python- how to reload page if loading takes too long?

driver = webdriver.Firefox() #opens firefox driver.get("https://www.google.com/") #loads google If it takes too long to load google, how do I make it close the browser and start ...
1
vote
0answers
65 views

How can I run Robot Framework tests in Opera/Safari?

I want to run my Robot Framework tests in the Opera browser. I know that Opera and Chrome share a webkit so first I tried to run my tests in Opera (using the Chrome webdriver) after successfully ...
0
votes
1answer
37 views

Python / Selenium: WebDriverException: Message: u'a is null'

I am running a few thousand lines of Python code that invoke Selenium to conduct web parsing. I just started using driver.refresh(), a method which creates an "alert" message that users can accept or ...
0
votes
0answers
23 views

Python: What modules do I need to include in the directory of my program to run Selenium with Unittest?

I am trying to run the following code using the Pycharm IDE: import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class PythonOrgSearch(unittest.TestCase): ...
0
votes
2answers
23 views

how to establish a session thourghout the selenium webdriver suite by using python in firefox

I want to establish one session at the starting of the suite. That session should be stay for longer time for multiple test cases.That session should end at the last. That session should be implement ...
0
votes
1answer
46 views

Selenium webdriver and python ERROR: Unsupported command addSelection

I'm trying to convert some of my selenium IDE scripts to webdriver/python runs. We have a page that contains a box with a list of options. I need to select an option, then click a button that moves ...
0
votes
1answer
118 views

Selenium. Get content for dynamic page including Ajax objects

In my Selenium test I need simply save web page content after all Ajax objects has been loaded. I have found answers how to wait for Ajax loading, however there is no working solution for saving whole ...
0
votes
1answer
36 views

How to select a extjs combobox with webdriver and python

How can i select this combobox and click to select the options ? When load that combobox again that always create a new id, so i can't use id. HTML: <input id="combobox-1168-inputEl" type="text" ...
1
vote
0answers
34 views

How to simplify a python function so the webdriver does't hang?

Hello fellow StackOverflow users. Currently I am writing tests via selenium and python to test the webcontent of the site I am working for. Some of the pages are dynamically filled out with updated ...
0
votes
3answers
86 views

Why does selenium webdriver access the network on every function call?

Wrote a simple test function using selenium webdriver in Python: from selenium import webdriver def test_webdriver(): web = webdriver.PhantomJS() web.get('http://example.com') ...
2
votes
1answer
134 views

How to assert image present in selenium python web driver?

I want to assert that an image is present on a page. I'm using selenium web driver with python. I also want a message printed when the image has not been loaded. Can anyone help me with a script? ...
1
vote
1answer
37 views

Webdriver. How to retrieve the xpath of found element?

I have a bit of code that finds an element based on visible text. # Defines the text I am looking for productName = "customer x job" #Finds the element I am looking for inputElement = ...
0
votes
1answer
25 views

Change temporary file location in python webdriver

I execute my Selenium tests on FF16, Selenium 2.33, Python on Linux. I have created separate firefox profiles corresponding to my devices. I observed a directory 'webdriver-py-profilecopy' is created ...
2
votes
1answer
35 views

Selenium Webdriver Python find next element

I have this HTML code: <caption> <em id="qwerty"> ABC </em> </caption> <caption> <em id="qwerty"> 123 </em> </caption> How can I make a ...
1
vote
1answer
94 views

Python Selenium Webdriver: finding #document element

I have been using Python's Selenium Webdriver getting elements with this HTML code. However, I could not access any of the elements inside this #document tag. I used both ...
2
votes
2answers
60 views

How do I select an element by its style from css (not inline) using webdriver (python)

I wish to use python-webdriver to select an element based on it's background highlighting colour. Normally, this bit of html: <div class="line-highlight" style="background:#FD71B5;"> I would ...
0
votes
1answer
44 views

Unexpected alert while closing Firefox web-driver in python

I have a simple script in python for logging into a web-site using selenium web-driver. The problem is when I'm trying to close web-driver, FireFox gives me an unexpected alert. This is my script: ...
0
votes
1answer
43 views

Selenium Grid Automatic Parallelization

I am trying to run Selenium tests in parallel. They are written in Python with unittest, and they communicate with a hub that is connected to several WebDrivers. What is the best practice for writing ...
2
votes
2answers
338 views

Selenium Webdriver Exception: u'f.QueryInterface is not a function

I've run into an interesting exception but I haven no Idea what caused it. This is my exception: File "/Users/tai/Documents/workspace/testSelenium/testS/__init__.py", line 86, in runFlashY ...
1
vote
0answers
60 views

Issue inputting data in CRM application with webdriver firefox

I'm using webdriver with python to try to automate a new CRM website we are creating. I'm new to webdriver and i am am having trouble inputting data into fields in the application. I can read from ...
1
vote
0answers
39 views

How to send “Control + F” keypress action in Python-Webdriver? [duplicate]

I need to open a webpage and send a keypress event (ctrl + f) which will move the focus to a text box inside the webpage. Then I need to send a string to that text box. I have two problems: The ...
1
vote
1answer
177 views

How to change Firefox settings in WebDriver test?

I am running WebDriver tests in Python on Firefox. I have configured my Firefox to make sure all the links of social networking sites are opened in the current tab. I specifically made following two ...
0
votes
1answer
94 views

webdriver wait for ajax request in python

Currently I am writing webdriver test for search which uses ajax for suggestions. Test works well if I add explicit wait after typing the search content and before pressing enter. ...
0
votes
2answers
71 views

Automated test for keyboard tab navigation

My webpage supports keyboard navigation where pressing the "TAB" key switches focus across the webpage items in a specific order. Pressing Enter key on a focussed item opens the popup/selects that ...
-1
votes
1answer
76 views

Use selenium webdriver as a baseclass python

I searched for a while for this one and was surprised i couldn't find anything, maybe because it's simple. I've been programming in python for about 3 months doing automated testing with selenium ...
0
votes
1answer
57 views

Webdriver cannot work well on clicking 'Start Date icon' and 'End Date icon'

I'm using Webdriver-Python to write automation click on 'Start Date' icon, 'End Date' icon to fill the date into these fields. Here the Date field in my web: |Period:|_____(1)_____[Start Date ...
1
vote
1answer
87 views

How do I get the text from multiple web elements with the same class using Selenium for Python?

I'm trying to scrape data from a page with JavaScript loaded content. For example, the content I want is in the following format: <span class="class">text</span> ... <span ...
1
vote
2answers
98 views

Webdriver WebDriverException/TimeoutException on click

I'm using webdriver to click on a submit button on a form in an iframe. Basically: self.driver.find_element_by_css_selector("[name~='field_1']").clear() ...
0
votes
2answers
94 views

Looping through xpath variables

How can I increment the Xpath variable value in a loop in python for a selenium webdriver script ? search_result1 = ...
0
votes
1answer
43 views

Invoking script from Selenium Python

I am brand new to selenium and am having trouble figuring out how to use Python and Selenium web driver to automate the following statement. This is a clickable text element "My Button Label". <a ...
2
votes
0answers
79 views

Is there a system independent way of minimizing ( iconize ) a firefox browser window opened by selenium firefox driver?

i'm using selenium webdriver, there is only maximize_window() method, how can i make the window "iconized" under windows and linux ? from selenium import webdriver browser = webdriver.Firefox() ...
0
votes
3answers
128 views

How to test for absence of an element without waiting for a 30 second timeout

I am writing some functional tests and it takes 5 minutes to do some simple single-page testing because the find_element function takes 30 seconds to complete when the element is not found. I need to ...
1
vote
0answers
96 views

Cronjob fails to execute python code

We have a Python Selenium Webdriver script that works perfectly when run from command line. However, the code seems to work differently when run by a cronjob, and the script hangs. The python script ...
0
votes
1answer
80 views

How to use socks proxy in webdriver's HTMLUNIT?

the code: cap = DesiredCapabilities.HTMLUNITWITHJS driver = webdriver.Remote("http://localhost:%i/wd/hub" % HTMLUNIT_PORT, cap) tried doing this before initializing: ... cap['proxy']['proxyType'] ...
-2
votes
1answer
60 views

How to get previous versions of Python Selenium Webdriver

Is there a way to uninstall Selenium Webdriver in linux? I want to reinstall an older version ie 2.33 which worked for me. Can you please let me know the syntax for installing specific version of ...
0
votes
1answer
239 views

Selenium Python. Click on radio-button does not any affect

First of all sorry for my english. I have a page with radio-buttons. Here is the html code of the button I want to click. <label class="radio-button__radio radio-button__radio_side_right ...
0
votes
1answer
69 views

Testing pages generated via window.showmodaldialog

I have a website that generates a page via javascript using window.showmodaldialog. When using the Selenium IDE and firefox I was forced to monkeypatch the javascript to insert a new fuction to ...
0
votes
1answer
111 views

Strange Webdriver issue with Mitmproxy

Here's a condensed version of my code, showing an issue with webdriver and mitmproxy: from libmproxy import controller from libmproxy import proxy import os from multiprocessing import Process from ...
2
votes
1answer
595 views

Selenium Webdriver: execute_script can't execute custom methods and external javascript files

I'm working with Selenium and Python and I'm trying to do two things: Import an external javascript file and execute a method defined there Define methods on a string and call them after evaluating ...
1
vote
2answers
89 views

Selenium - get all iframes in a page (even nested ones)?

I am trying to search through all the html of websites that I reach using selenium webdriver. In selenium, when I have an iframe, I must switch to the iframe and then switch back to the main html to ...