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

learn more… | top users | synonyms

0
votes
1answer
50 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
1answer
141 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, ...
0
votes
1answer
72 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
0answers
19 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
49 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
50 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
40 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
96 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
65 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
64 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
1answer
283 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, ...
1
vote
1answer
183 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
184 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 ...
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 ...
3
votes
1answer
743 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 ...
0
votes
0answers
74 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 ...
1
vote
5answers
174 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
0answers
49 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 ...
0
votes
2answers
333 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, ...
2
votes
0answers
84 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, ...
2
votes
3answers
135 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
0answers
77 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
1answer
389 views

how to handle widows authentication dialog using webdriver in python

I have 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 ...
3
votes
4answers
398 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 ...
1
vote
1answer
161 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
2answers
167 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.
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
202 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
381 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 ...
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
2k 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 == ...
0
votes
2answers
534 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 ...
0
votes
1answer
284 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 ...
1
vote
10answers
9k 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.
0
votes
2answers
224 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
1answer
36 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 ...
0
votes
2answers
717 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 ...
1
vote
1answer
529 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 ...
0
votes
1answer
2k 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 ...
0
votes
1answer
239 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 ...
1
vote
2answers
293 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 ...
0
votes
1answer
210 views

Upload image via ajax form with selenium and Python

I'm trying to get familiar with selenium. I decided to try to work with facebook, and fulfill my profile with selenium, But they use too much Ajax. It's not very complicated to fulfill my hometown ...
1
vote
1answer
891 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 ...
3
votes
1answer
1k views

Cannot upload a file using requests module in python

After two days of continuous trial, I thought it's better to ask you folks here. I want to upload a file on my desktop to a remote server. For this I am making use of python and its module requests. I ...
3
votes
1answer
2k 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 ...
1
vote
3answers
203 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 ...
3
votes
1answer
114 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
2answers
4k views

How can I dynamically create an xpath string in Python for a webdriver xpath selector?

I am writing a Selenium Webdriver test using python2.7 to use xpath to select a link node set. For each link I need to change the href attribute using driver.execute_script to execute javascript. ...
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 ...
3
votes
2answers
610 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 ...