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

learn more… | top users | synonyms

1
vote
1answer
12 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
2answers
31 views

Verify two elements exist next to each other on a page

I'm trying to verify that an element exists on a page next to another element. I'm using Selenium Webdriver with Python bindings, but can't figure out how to do this...i'm a Selenium/Python noob BTW. ...
1
vote
0answers
44 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 ...
0
votes
2answers
409 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
1answer
19 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 ...
0
votes
1answer
28 views

Selenium webdriver not recognizing div element

I have found several questions related to this one particular travel website MakeMyTrip, so I tried to automating it. I was successful in selecting the primary details and getting on the Flight ...
2
votes
1answer
5k views

How to retrieve INT value from TEXT box using Selenium/Webdriver Python binding?

I have this code tcost = driver.find_element_by_id("MainContent_txtTotalCost").text total = int(tcost) driver.find_element_by_id("MainContent_txtVisa").send_keys(total/2) ...
0
votes
1answer
437 views

How to handle widows authentication dialog using webdriver in python

I have an application which is secured by http authentication. So when I open the URL it is looking for user/pass in windows authentication dialog. I wanted handle this dialog to enter user/pass and ...
0
votes
1answer
34 views

Understanding how to handle auto-complete using Selenium and Python

While testing for a certain web application, I was faced with an issue of handling auto-complete scenarios. An example of this kind could be found here MagicBricks I have few questions related to how ...
0
votes
1answer
21 views

Iterating across various open windows using Selenium and Python

So my question deals with iterating over multiple open windows at a time. Suppose I am opening a website (best example would be Naukri). As soon as the page loads, two more pop up windows open up. ...
0
votes
2answers
1k 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 ...
1
vote
1answer
25 views

Testing a Python REST API

We want to add formal testing an quality assurance to our application API. It is written in Python using Flask with Restless and outputs JSON. My question is what is the best way to test our API? It ...
18
votes
4answers
2k views

Tools for Python software testing

Similar to Tools for Java software testing, I'm looking for Python-related testing tools/software (as Python is my most frequently-used language).
1
vote
1answer
79 views

How to connect to Java Applet using Python

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
1answer
526 views

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

I'm ne to coding and python. Not sure where exactly I should be looking to fix this error. from UIMap import tomcat8LoginPage, ...
6
votes
5answers
3k views

Manual tester wanting to get into automation

So its been a year since I have been studying python, and just recently I started picking up webdriver. It was a long journey, and I am still pretty noob, but I finally understand how to use it lol. I ...
6
votes
1answer
5k views

Set attribute of an element using webdriver + python

I am trying to automate uploading an image. The uploader is a Flash object and using AutoIt is not an option. So I am trying to work my way around this with just webdriver. The idea is to 'set' the ...
3
votes
4answers
503 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
1answer
110 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 ...
32
votes
4answers
44k 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
1answer
963 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 ...
2
votes
1answer
393 views

How to send Basic Authentication headers in Selenium?

I'm using webdriver.Firefox and I'm trying to send the following custom header: self.headers = { 'Authorization': 'Basic %s' % b64encode(bytes(self.args.user + ':' + self.args.password, ...
2
votes
0answers
95 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
2k views

Webdriver - Problem with loading profile of Tor Browser Bundle

could you give me any suggestions how to solve the weird problem I experience with webdriver? I like to use webdriver to control the browser from the Tor Browser Bundle (TBB). Controlling the TBB via ...
0
votes
1answer
130 views

Python selenium - how can I loop a function to make 100 Copy accounts using different emails

How can I loop a different string into the email field, or a variable without actually having to make a list that consist of 100 different emails. For example is there a way i can send money@qa.test ...
4
votes
3answers
14k views

How to click a link / button implemented as a div or span element with WebDriver

in my testing I need to click on a 'link' or a 'button' (actually it just looks like and functions as a link or a button) that is implemented as a div (or span) element. With Selenium IDE, I tried ...
0
votes
1answer
78 views

Setting up Page Objects with python and seem to be getting every error possible

WebTeam init.py BasePage.py UIMap.py Pages: init.py Common.py ContactPage.py test: init.py CompetitorsTest.py CreateAnonData.py CreateKnownData.py import unittest ...
0
votes
0answers
30 views

The unstable elements crawled with selenium using python

When I used my script to crawl "fortune.com/fortune500", I crawled the ranks and companies' names in top500 filter-list part. I even forced the wait time after click the option-value on the list ...
0
votes
1answer
85 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
111 views

How to get data-href instead of href with selenium in python?

I have currently a python code that should grab a link from google. However, google uses a somewhat different method to linking. how could I grab the data-href instead of just href. this is the ...
0
votes
1answer
60 views

is_displayed with python and web driver

So when my test pass it will show the "yeah" word in the end, however when it fails , it will only show and exception NoSuchelement and the word "Failed" will not show up anywhere. its like else ...
0
votes
6answers
115 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 ...
2
votes
3answers
144 views

Robot framework installation

I want to learn robot framework with java and python, but not sure how to use this?. I searched over the net but did not get steps to instal robot framework. I installed only selenium2library file in ...
1
vote
1answer
285 views

How to use Python/Webdriver to go through multiple URLs and take screenshots using loops? [closed]

I want to use Python/Webdriver to run through many client websites (and subpages within those websites) and take screenshots of each page. Currently, I have this working, but all clients are in their ...
2
votes
1answer
237 views

How do I create a loop within my selenium python script to select every option within a dropdown menu

Im new to python, or coding for that matter... Currently I have a python script to select one option within the dropdown menu, but I would like my script to repeat each time and select the next ...
1
vote
0answers
84 views

Tagging python tests for selective execution

What I am trying to do is : create a tagging system for around 400 tests so I can run them selectively. For example, some tags may be UI_elements, production, staging etc. When a developer makes a ...
0
votes
0answers
89 views

Selenium screenshots from chrome are mirrored

When using Selenium remote driver accessed via python, I'm seeing screen shots taken from Chrome are being messed up. The images are mirrored. Snapshots taken with IE9 work without issue. chrome ...
3
votes
5answers
13k views

How to select or check multiple checkboxes in Selenium?

I've got this HTML code <input type="checkbox" value="abc" name="arr[]><br> <input type="checkbox" value="abc1" name="arr[]><br> <input type="checkbox" value="abc2" ...
2
votes
5answers
220 views

Selenium Webdriver get() shows intermittent TimeoutExceptions - how do I proceed?

I'm using Selenium Webdriver for testing a Django/Python based web application. I use both, the phantomjs and firefox drivers. We use django's LiveServerTest test case, which basically starts up a ...
0
votes
2answers
217 views

Desktop application automation

I need to automate desktop application i.e Bluetooth PTS tool. But can't find any good way to do. I have no exposure to scripting.
1
vote
3answers
204 views

What makes Python a good tool in daily testing?

I have seen people commenting that Python is a very handy language in everyday's testing. I wonder what makes it such a good tool, or what testing tasks are easier to achieve with Python than with ...
0
votes
0answers
52 views

ElementNotVisibleException on Mac, not Windows

I'm trying to get Webdriver in Python to click a cell in a table, wait for JavaScript to add an element into the cell and then click the element that appears which causes a dropdown to appear. We ...
2
votes
3answers
6k 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 ...
11
votes
3answers
3k views

What are some tools for fuzz testing?

Fuzz Testing as defined by Wikipedia is: a software testing technique, often automated or semi-automated, that involves providing invalid, unexpected, or random data to the inputs of a computer ...
2
votes
10answers
11k 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.
1
vote
1answer
213 views

How to start all tests with a clear session after browser crash,

Im using WebDriver and Python to automate a website. I have a suite of tests and sometimes running into the following problem. Test no.1 = Login to home page, navigate to Account page, perform some ...
0
votes
4answers
1k views

Selenium - advantages and disadvantages of using Python vs C#

We currently have two teams. An automation team and also a web testing team. The automation team currently use Selenium and C# to automate tests on our web applications and legacy systems. As a ...
0
votes
2answers
243 views

Accessing a sub menu within a sub menu using Webdriver with python on IE8

I have been trying for a while to complete this task. For context, I have a link called with text "Main Menu" along the top of the page, that when hovered reveals a list of more links. These links ...
4
votes
2answers
443 views

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

I need to use selenium to do some automating testing, I wonder which Language has better support for selenium, That is once new version selenium released, And I can get the newest version binding ...
4
votes
1answer
130 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 ...