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

learn more… | top users | synonyms

2
votes
1answer
926 views

Selenium Python testing: would like to write test results to a file

I'm writing a suite of web tests in Python using Selenium. Ultimately, I want to generate a file with the results, which will then be sent out in an email. I'm using a main Python script to kick off ...
2
votes
1answer
3k 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. ...
2
votes
1answer
75 views

Can/should ChromeDriver be installed on the same PATH (usr/bin) as Python, easy_install, etc.?

The Selenium WebDriver for Python video I'm watching instructs me to copy ChromeDriver to /usr/local/bin. When I view my $PATH, I can see /usr/local/bin, but if I cd to /usr/local/bin it says the ...
2
votes
1answer
75 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 ...
2
votes
2answers
2k 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 ...
2
votes
1answer
926 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 option....
2
votes
1answer
990 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 ...
2
votes
1answer
532 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 ...
1
vote
3answers
210 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 ...
1
vote
2answers
501 views

Selenium Webdriver Mobile with Python - AndroidWebdriver4Python installation question

I found this Android webdriver API on github. I already have the Selenium Python client and have written many plain web-based test scripts with it. I have tried asking the git owner, but he has not ...
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
5answers
2k 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 ...
1
vote
2answers
302 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 ...
1
vote
1answer
1k 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 ...
1
vote
1answer
41 views

Looping over the array of other function in current function

I need a help to know how can I can iterate a loop over a array which is in another function of the same class. I tried using the following similar code for automation in selenium and I get the ...
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 (...
1
vote
1answer
134 views

Installing ddt on Ubuntu with Python 3

I am working on a Ubuntu system which has both Python 2.7 and Python 3.4 installed. I was trying to install the ddt library for creating data driven test cases. However when I try installing using ...
1
vote
1answer
452 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 ...
1
vote
1answer
918 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 ...
1
vote
2answers
626 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
1answer
3k views

Unable to find element in selenium

I'm using the following code: if i[1] == "id_text": inst = driver.find_element_by_id(i[2]) #inst.click() for option in inst.find_elements_by_tag_name('option'): if option.text == ...
1
vote
2answers
1k views

Force selenium to use the portable firefox application

I have installed firefox 14 and has firefox portable version 25.0.1 on the machine, where I run tests for a web site. Due to a limitation in the site I'm testing, I cannot run my tests on firefox 14 ...
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:/...
1
vote
1answer
4k views

Selecting xpath using a variable in selenium 2

I am doing a selenium automation where I want to pass the variable into the xpath and select the element. The xpath which I am trying looks like: browser.find_element_by_xpath("//span[contains(.,'SEM ...
1
vote
1answer
2k views

How to use databases within the python unittest framework?

I have a bunch of unittests written in python in which messages (text) of any kind is used. Instead of 'hardcoding' the text examples used for the tests I would like to use a database of some kind (...
1
vote
1answer
966 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 ...
1
vote
1answer
55 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,...
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 (...
1
vote
1answer
63 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 ...
1
vote
0answers
442 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 ...
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
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
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 ...
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 ...
1
vote
1answer
1k 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 ...
1
vote
0answers
157 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
2answers
290 views

Migrating website content, need to test using Selenium/Python

We are working on a large project which involves LOTS of content being migrated to a new version of a website. I would like to be able to test the content on a page from the old site, with the same ...
0
votes
4answers
2k 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
1answer
695 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 ...
0
votes
6answers
256 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
2answers
607 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 ...
0
votes
1answer
335 views

CSS/XPATH selector management using python's dictionary

I have a lot of functional tests in Python. As expected , they use a wide variety of css/xpath selectors . I think I read somewhere that a practice is to have a dictionary where each selector would ...
0
votes
1answer
39 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
2answers
117 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
1answer
82 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
2k views

how to proceed after clicking a link to new page in selnium in python

I am clicking a link which takes me to new page, but I don't know how to proceed after that. When I try to find an element by id in the next page it gives me error: (selenium.common.exceptions....
0
votes
2answers
106 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.
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 ...
0
votes
2answers
531 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 ...