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

learn more… | top users | synonyms

3
votes
1answer
4k 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 ...
4
votes
1answer
699 views

Getting nose test runner to execute a test against multiple browsers / configurations?

Surely someone else has run into this problem. I'm trying to figure out how to loop through Firefox, Chrome, and IE in conjunction with nose. Right now I have: "setup.cfg" file that specifies ...
3
votes
2answers
472 views

Load / Performance testing tools or approach for backend

I work on a team which is basically all backend. Functional and unit testing is achieved by python or perl scripts or sometimes bash scripts. But if we need to load or performance test our ...
1
vote
2answers
3k views

How can I access a site protected with basic HTTP authentication using Python, Selenium2, and Chrome Webdriver

I'm using the Python bindings for Selenium2 with the Chrome webdriver. I need to access a site that is protected with basic HTTP authentication. from selenium import webdriver driver = ...
0
votes
1answer
457 views

How to assert values on a page opened by a link on another page?

A link on page 1 opens a new page "receipt page". It contains only text values. I need to assert or verify values on the receipt page to ensure that this is the correct receipt. After executing the ...
0
votes
5answers
720 views

Select a certain item by clicking a link beside that item

I have a popup with list of names. I need to choose "mahmoud" for instance by clicking the "select" link beside the label "mahmoud". How to click that select? I am using selenium webdriver with ...
4
votes
4answers
3k views

Running Selenium tests as a scheduled task

I'm trying to run a Selenium WebDriver script written in Python on a Windows 7 64-bit box as a scheduled task. The test works pretty well when run as a batch file from the command prompt, but when ...
1
vote
1answer
117 views

More official way to leave browser window open upon failure?

My coworker Chris came up with this, and it works, but I wonder if there's a more "official" way to do this using unittest.TestCase in Python. def tearDown(self): """ clean up by closing the ...
3
votes
3answers
10k 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 ...
1
vote
6answers
273 views

Language preferences in the QA community

I work on a test management tool that includes a REST API. We are looking to add code examples for consumption of the API as well as client libraries. Initially we were looking to target Python for ...
2
votes
4answers
5k views

Click submenu which is dynamicly visible in Selenium WebDriver

In my scenario, I need to click the submenu that's only visible when its parent menu is in 'mouse over' status: MainMenu (button) SubMenu of MainMenu (span) SubMenu of SubMenu of MainMenu ...
1
vote
1answer
62 views

Unskipping skipped tests once bugs are fixed?

I'm wondering how others in the industry deal with this. Right now I do this in my tests that have known bugs and aren't worth taking the time to run: from nose.plugins.skip import SkipTest def ...
1
vote
2answers
579 views

Do I need the PageObjects design pattern or not?

Right now I have a Selenium WebDriver framework that looks like this (vastly simplified): \app_func.py -- app_func has the web app's "actions", such as "save a new search" \app_data.py -- app_data ...
3
votes
1answer
2k views

WebDriver function failing intermittently in Internet Explorer near clear() method

Does anyone know why this WebDriver function would be failing intermittently in Internet Explorer? Seems to always fail right around the textbox.clear() line. It works perfectly in Firefox, but fails ...
1
vote
1answer
2k views

Iterating through a table : Avoiding stale element exceptions (Webdriver - Python)

Here is an interesting problem (or at least i think so) As an Admin I have a table with N entries (51 to give a number). Each entry in a row is a recruiter name with a link to 'Login' as that person. ...
1
vote
1answer
454 views

How can I convince Squish to recognise the menu bar on Mac OS X?

I'm currently recording some python test scripts for a Mac OS X application using Squish for Qt, version 4.0.2. The menu bar of the AUT works fine if interacted with manually, but for some reason ...
6
votes
1answer
1k views

Unable to run standalone test script in Selenium with Python

So, I have the latest Selenium 2.0 Python bindings installed via pip (Python 2.7.2, Windows 7). I wrote a small script to see if I could get it working: from selenium import webdriver driver = ...
3
votes
1answer
912 views

How can I test a table of options with python unittest and nosetests?

I have a list of twelve properties and want to test various combinations. The actual test function is the same, just different parameters. I find myself writing a bunch of functions that look like ...
-1
votes
2answers
998 views

How to get the last value in a list/string using Python [closed]

I am a beginner in writing Python scripts and I need help on the following: Threads::num,47141,47146,47151,47156,47161,47166,47171,47176 How can I get and display the last value '47176' The ...
4
votes
1answer
355 views

How to 'Mock' SVN

I am testing an app that does some subversion interactions, such as comitting, adding, stat, etc. What's a good way to get me started in terms of mocking the subversion client and working directory ...
5
votes
1answer
751 views

How do I write a script to be executed by Hudson to automatically restart test environment machines?

I am working in a test environment where we need more than 10 machines, including VMs. The AUT is a Distributed Network type and uses Cassandra nosql DB. We are required to restart each of the ...
-1
votes
2answers
227 views

What would be a good test Orchestration tool for Python unit tests

what comes to mind is Make, or build.xml, but have not found a comprehensive Orchestration tool for python testing
3
votes
2answers
114 views

Approaches to Testing a Scientific Library

I'm quite interested in the Scipy/Numpy project which is basically a Python scientific computation/numerical methods library. I'm also interested in testing. What are some good approaches for testing ...
4
votes
2answers
717 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 ...