Python is an interpreted, general-purpose high-level programming language whose design philosophy emphasizes code readability.

learn more… | top users | synonyms

1
vote
1answer
108 views

Expecting a popup upon closing the browser

I am expecting a pop-up upon closing the browser. For example, when you are shopping and you have items in cart and in the middle of the checkout process, you wanted to close the tab/browser, at that ...
0
votes
1answer
23 views

How to log out in facebook using python selenium?

I want to know how to log out in facebook using python selenium. here's my code: from selenium import webdriver from selenium.webdriver.common.keys import Keys import time #from selenium folder ...
1
vote
2answers
63 views

webdriver.support.select - Select doesn't interact with the element

Hello, I have the following select: <div class="col-xs-12 col-md-6"> <label class="ph_label pointer city"> <span class="l citylbl">City</span> <select class="cities custom-...
1
vote
2answers
1k views

ImportError: No module named 'httplib'

I have recently updated selenium Webdriver to 2.38.1 and I am writing scripts using python. When I run the test case I have I get the following error *Traceback (most recent call last): File "C:/...
0
votes
2answers
521 views

Selecting multiple options and deselecting options using Selenium with python

I am trying to open a webpage and select options before submitting the form. The issue I am having is being able to selecting more than one option in the select box. Eventually I want to be able to ...
0
votes
1answer
3k views

TypeError: Error when calling the metaclass bases module.__init__() takes at most 2 arguments (3 given)

I'm new to coding and Python. Not sure where exactly I should be looking to fix this error. from UIMap import tomcat8LoginPage,tomcat8urls,competitors class test_Competitors(unittest): def setup(...
0
votes
1answer
50 views

Can't get Selenium to select option

I have been trying for a long time to get Selenium to select from this dropdown. Is anyone able to do it? It appears to not be selecting the element whatsoever. Could the fact it requires a reload ...
0
votes
0answers
7 views

A logical “or” inside a Selenium test case

Assuming I would like test for a default Apache server response at one point, and I would like to make it platform agnostic. For CentOS I have: def test_web_interface(self): self.driver.get(...
7
votes
2answers
4k views

How to clear localStorage using selenium and webdriver

I want to call localStorage.clear() before running a group of specific tests but the thing is I don't know how. I can see CLEAR_LOCAL_STORAGE variable mentioned here but still failing to understand ...
10
votes
2answers
5k views

Is there any full Python webdriver API documentation?

I'm starting out using Selenium 2/Webdriver, been using Selenium IDE for a few weeks, to automate some tests and decided to go with Python. I've been writing some simple tests using some basic ...
6
votes
0answers
247 views

select_by_value causing odd issue with the DOM

I'm new to Python and Selenium testing so please forgive me if this isn't written right. I've been asked to look at the test that does a few actions on a form. The form has 2 text fields, a drop down, ...
0
votes
1answer
37 views

Anyone find value migrating to NightWatch from Python Selenium API?

My dilemma, I have tons of tests and experience on the Python API to Selenium and webdriver. But, my dev team is big time javascript fans who think everything should be built under node/js. I want to ...
0
votes
0answers
7 views

How can we iterate URLs in django testcases?

How can we check the status of all the URLs(list of URLs) in django testcases? I tried below code but its not working for me. Please help! def test_url(self): global failed, error_data, ...
1
vote
1answer
52 views

What's the difference between using Python vs. Ruby for Browser Automation testing? [closed]

I want to automate test cases on web browsers and I love the concept of Python's Salad (mix of Lettuce (BDD) and Splinter (browser automation)). But I've heard that Salad might not be the most stable,...
6
votes
3answers
156 views

Python based test automation tools for desktop applications

I have some experience as a manual tester and at my current work our regression testing takes about 2 days. I am planning to start automating some of the test cases. I am looking at some of the free ...
4
votes
0answers
73 views

How to retrieve httponly cookies with IE selenium driver?

By my research so far, IE selenium webdriver (for IE10 or 11) is not able to retrieve httponly cookies. So code like this can return a full set of cookies including those set to httponly if I am ...
1
vote
0answers
20 views

Include python tests in JS projects

Currently I am responsible for test automation and my company develops applications in Node.js. For web applications, I'm using python and selenium-webdriver. Is there any way to integrate the tests (...
3
votes
2answers
43 views

How to access a web page INPUT element using selenium python

Below is my website content <input type="text" title="Query for bugs (&quot;Go box&quot;) [Alt-K]" name="Go" id="GoText" size="23" onkeypress="GoBoxKeypress(event)" onblur="...
1
vote
1answer
62 views

What frameworks are good for a beginner in automated functional testing? [duplicate]

I want to start doing some functional testing. I tried some time ago in Java and Selenium, but seemed to run into a number of problems with configuration. Previously I have made simple tests with ...
5
votes
2answers
872 views

Which has the better support for Selenium, Python or Ruby? [closed]

I need to use Selenium to do some automating testing. Which language has better support for Selenium? That is, once a new version of Selenium is released, And I can get the newest version binding on ...
3
votes
5answers
1k views

Page Object Design: Is there a Python equivalent to Ruby gems “site_prism” or “page_object”?

I'd like to know if there is a framework in Python which supports a clean way to define the Page Object Elements on a Page Object. The site_prism gem does it like so: class Home < SitePrism::Page ...
0
votes
0answers
39 views

Jenkins build failed with Revision error

I was trying to run Jenkins on a simple Python test. It's my first time, so I followed steps mentioned in this tutorial : Link My Jenkins console output after I triggered build shows that it failed ...
3
votes
1answer
3k views

How to handle a native OS (Ubuntu) file upload window in selenium webdriver with python?

This is my first time here but I have already posted this question on SO. I keep getting solutions for Windows + Java and not for Linux or python for that matter. I am using selenium and python to ...
0
votes
0answers
42 views

Could not click the upload button for SafariDriver

There is a upload button on the website as the code below <div class="fileUpload btn btn-primary"> <span>Upload</span> <input class="upload" id="id_file" name="file" ...
1
vote
0answers
428 views

Appium vs Espresso for Android Automated Testing

For last few weeks, I was using appium(python) for android testing but yesterday we have decided to shift to Expresso(Java) for automated testing. There are couple of reasons why we are making this ...
0
votes
2answers
114 views

How to send keys in an Ajax dropdown?

I already got the Xpath, but when I'm trying send keys there is error : Error Traceback (most recent call last): File "C:\Users\Admin\PycharmProjects\Belajar1\Register.py", line 23, in ...
0
votes
0answers
63 views

How to use selenium.captureNetworkTraffic in Python?

I'm interesting in debugging my browser session and I found that it is possible to save http requests with their answers to a file using captureNetworkTraffic in json format. But I can't find any doc ...
0
votes
0answers
131 views

How to enter text in a javascript field using python selenium

I have a address input text field on website which is basically auto populated by ajax request. This is not a drop down field through which you can select some value, neither you can input your own ...
1
vote
2answers
1k views

Mocking HTTP reponses in Selenium Web Driver using Python

I am currently experimenting with the Python version of Selenium Web Driver. Using the driver has been straight forward so far but I have been struggling recently with the issue of mocking HTTP ...
0
votes
1answer
80 views

Python+Selenium: Continue script execution by ignoring timeout error

How can I get this line elem = WebDriverWait(driver,10).until(EC.visibility_of_element_located((By.CSS_SELECTOR,lastTweetCss))) to move on further in the code if it doesn't find anything after ...
3
votes
1answer
894 views

E2E testing of Angular app with Python backend: Protractor/JavaScript vs webdriver/Python

We have extensive Python-based application, with many E2e tests (and of course unit tests), all in Python). We started e2e test in FitNesse (Selenium1, with Python fixtures) many years ago. Recently ...
3
votes
3answers
2k views

Python or Java for Loading and Performance testing

I'm looking to choose the best tool to perform Load and Performance testing on my web based application. The content of the application is based on Jasper reports and I want to see the behavior of the ...
6
votes
2answers
1k views

Python coverage and external executables

I have a project that has almost complete unit test coverage. There's only one statement that isn't covered and I can't work out a good way to do so. Say the project is called foo, I have foo/commands....
1
vote
3answers
3k views

Selecting an item of a drop-down menu with Splinter lib (Python)

I am looking for a way to select an item in a drop-down menu in python with Splinter (very similar to selenium I guess) : <li class="option1" rel="1158"> Option 1</li> <li class="...
1
vote
2answers
295 views

Problem with Selenium send_keys function and JavaScript event triggered by data change

I am using Python to write a Selenium test script and I have not been able to use it to enter data for a text area. Entering data into this area appears to trigger a JavaScript function that caches ...
3
votes
1answer
385 views

How to connect to Java Applet using Python [closed]

I am looking for a solution. I am trying to automate user interaction on a web application which is having embedded java applet in it. Based on what I've found on the internet I know there are ...
0
votes
6answers
252 views

Which can be better to work with Selenium WebDriver - Java or Python? [closed]

I have start learning Selenium WebDriver, but i am confused between Java and Python. Which language should i choose? I do have basic ideas of Core Java but haven't wrote a single piece of code with ...
0
votes
1answer
651 views

Question about 'self.assertIn' & 'driver.title'

I researched this as much as I could on my own but came to no clear conclusion to my question. I've been teaching myself automation testing via Python + Selenium, I'm as new or n00b as it gets so bare ...
0
votes
2answers
3k views

How to set browser locale with chromedriver (Python)

I am trying to set my browser locale by doing the following options = webdriver.ChromeOptions() options.add_argument('--lang=es') driver = webdriver.Chrome(executable_path=driver_location, ...
0
votes
0answers
110 views

Selenium Webdriver with Python - Unable to click on “Open” or “Save” or “Save as”

I'm a first time learner of Selenium with Python and I'm facing the below issue: When I click on a Download template link in an application, the OS give the User with the options Open or Save or Save ...
1
vote
1answer
1k views

Can't click a button [Python + Selenium]

I'm writing a program to automate some actions on a website using Python and Selenium and I need to click a button with this code: <button class="button login" data-popup="login">Change User<...
1
vote
1answer
40 views

Data type/value of argument checking [closed]

Consider ClassA that has a method that takes an argument, say a string. This method then passes the argument to ClassB to do something with it. Should ClassA be assuring that the argument is valid (...
0
votes
1answer
85 views

Reporting for Python tests built using PyUnit

I am looking for a good reporting tool for Python tests-specifically the one which supports Python 3.0+, with Selenium, built using the default PyUnit framework. So far I have come across only one ...
6
votes
2answers
501 views

How install both Python32 and Python33 on OS X for testing with tox?

I'm adding Python 3.x support to my open-source project and want to add both Py32 and Py33 test environments to my tox.ini. I already have Py26 and Py27 tox environments that work fine and I just ...
2
votes
13answers
21k views

Should I learn Python or Java to get into test automation? I am new to programming

Should I learn Python or Java to get into test automation? I'm new to programming. Please share your thoughts or links to any useful information.
2
votes
2answers
2k views

Verifying if an image Is displayed on a webpage

I have read that there is no "sure shot" way of knowing that an image is loaded or displayed on a webpage using Selenium. I want to know the reason behind it, as to why this is completely not possible....
0
votes
1answer
3k views

how can i switch to the new instance of browser in python selenium webdriver [duplicate]

I am using selenium webdriver with python. I am not able to find a way in python by which I can switch the webdriver to a new browser. My web application have multiple links and buttons Clicking on ...
2
votes
4answers
2k views

Which language to choose for Appium - Python or Java?

We have an iOS application (written with Obj-C and now starting to incorporate Swift) that we want to write tests for using Appium. Our test team comprises of people who have little programming ...
41
votes
5answers
70k views

What is the correct way to select an <option> using Selenium's Python WebDriver

I would like to select an <option> child of a <select> using the Python WebDriver. I have a reference to the option WebElement I wish to select and have tried select() and click() methods ...
3
votes
4answers
9k views

How to specify a Firefox profile name when using webdriver + python

I'm using python 2.7.1 and selenium 2.20.0. I have a seperate firefox profile called "selenium" which I want to use when running the webdriver. I managed to do it by specifying the complete path to ...