Questions tagged [python]

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

Filter by
Sorted by
Tagged with
5
votes
6answers
37k 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" name="...
0
votes
2answers
2k views

Not able to locate the web element with partial xpath and text [duplicate]

I have web element set like below .. <div class="dxnb-headerCollapsed" id="ctl00_LeftPanel_LeftNavigationMenu_nbMenu_GHC1"> <i class="fa fa-handshake-o fa-2x fa-fw" style="">&...
0
votes
1answer
848 views

pytest selenium output flooded with debug logs

What's Happening I'm writing acceptance tests with selenium-python and pytest on python 2.7. Whenever a test fails the CLI output is flooded with debug output under ---captured log call--- for every ...
1
vote
3answers
1k 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.
4
votes
2answers
2k 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
1answer
56 views

Seeking Python test frameworks that support structured test results that include “non failure” data

I am having a hard time finding any test frameworks or plugins for frameworks that support saving "validation data strings" as part of the test results. I find this a little surprising so I am hoping ...
1
vote
1answer
666 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,...
2
votes
1answer
9k 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 ...
2
votes
1answer
217 views

Test Automation for a website with over 8000 webpages

I have joined a team recently where I have been asked to implement automation testing for a SiteCore based website with over 8000 webpages. The exact functionality that was expected of me was to ...
0
votes
1answer
549 views

Python/Selenium automation email question

I am completely new to development and automation so I've been playing around with Python and Selenium to fill out simple forms. The form I am using will detect existing email addresses in a Database ...
-1
votes
1answer
1k views

Python Selenium: Unable to find a element when the element already exists

I'm having issues looking for this specific input: <input type="text" class="criteriaFieldInput ui-autocomplete-input" id="KEYWORD" isautosuggest="true" suggestid="1" isolf="false" isphrase="false" ...
1
vote
2answers
1k views

Selenium: how do I download a PDF from a pop-up?

I know this question was probably answered already, but all the answers I found are either old and involve using Selenium APIs that are deprecated, or require a third-party tool, which is overkill for ...
8
votes
6answers
71k views

Quicker way to assert that an element does not exist

The goal of my test is to assert that a popup does not appear after certain actions. Previously to test if the popup exist, i have used exception handling. try: self.driver.find_element_by_id("...
0
votes
1answer
2k views

How to save a file by clicking on a link in python-internet explorer-windows [duplicate]

I am having a problem downloading a file using selenium. I had to use selenium to hover over some menus and finally got to the last link which I need to click and reveal 30 zipped files that have a ...
3
votes
3answers
691 views

Where do Fitnesse fits between unittests and API testing?

Our team writes unittests for our python projects. Besides that, we have a tool that allows us to run scripted API tests (we can make requests and evaluate the result, passing or failing the test). I ...
1
vote
1answer
1k views

How to handle mouse over event on submenu in Internet Explorer - Selenium using Python

I am having a problem using selenium and internet explorer 11. I have to automate a website data gathering project where I have to scrape the website for CSV links and download then automatically ...
1
vote
1answer
969 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
2answers
609 views

How should I handle tests failing prior to a logout and causing other tests to fail?

I have tests which require user to login For such tests I register new user Such tests also have user_logout function (right before assert) The problem: If tests fails somewhere prior to calling ...
1
vote
1answer
518 views

Selenium Webdriver | Python (Tumblr) : Cannot access element ID after posting

I'm trying to create a test case for Tumblr (currently in the process of learning automation) and I'm stuck on trying to access the drafts page. So here's what's happening - after I post an image as ...
1
vote
1answer
561 views

Selenium Python

I'm new to automation testing and decided to use Tumblr as my subject. I'm having trouble making the options appear, see image attached, and don't know what else to use. The code I'm currently trying ...
1
vote
0answers
596 views

How to disable file upload dialog with selenium python?

I'm trying to drag&drop a image to: <input class="aaa" multiple="" name="bbb" style="display:none;" type="file"> with: path=os.getcwd()+r'\\' WebDriverWait(driver, 10).until(EC....
1
vote
0answers
31 views

Technology limitations for web application that scrapes web pages [closed]

I am starting the development of a web platform that provides automated tasks to users, and I have been redirected to this forum after asking the same question in stackoverflow and not being accepted ...
5
votes
2answers
2k views

Pros and cons of python unit testing packages

I am starting on my first large scale python project and I want to put the right testing package in place not only to get the job done but also so when hiring people down the road it's easy to find ...
1
vote
2answers
3k views

Python Selenium, Drop Down

I can't get Python to select "Buy" from the drop down menu: <a href="" role="button" aria-pressed="false" class="td-wb-dropdown__item-content" data-ng-click="tdWbDropdownItemController.select()" ...
-1
votes
3answers
647 views

Behat, Java or Python [closed]

I started in the world of QA about 1 year ago and I started as a QA tester. But for almost 6 months ago, I started with the automation testings. I started with selenium and behat. In my company they ...
1
vote
1answer
121 views

Which conditions have to cover in White box testing?

During white box testing which conditions have to be tested? Consider a post request with integer data. In the function, I will convert that post data (string type) to an integer type. I am using ...
1
vote
1answer
451 views

Unresolved attribute reference 'is_selected'

Bit of a newbie so apologies if I'm missing something obvious. Im trying to loop through some checkboxes to ascertain if they are selected or not and I am getting an unresolved attribute reference ...
7
votes
1answer
6k 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
2answers
732 views

Getting warning from unit test

I get a warning from this test but I don't know how to handle it. The warning is /usr/lib/python3.5/unittest/case.py:600: ResourceWarning: unclosed file <_io.BufferedReader name='/tmp/...
3
votes
2answers
811 views

What to test when “testing” a PDF download?

What should I test if I have created a scenario with Python (bottle + mako) and web front-end to download a PDF file for registered users? I can use selenium to start Firefox, login and trigger the ...
4
votes
2answers
2k views

How do I structure my Python project based on the Page Object Model

I'm currently trying to implement a base for my automated tests based on the page object pattern with Python, Selenium and Behave. I've never really worked in a reasonably big QA project, especially ...
9
votes
5answers
8k 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 ...
1
vote
2answers
50 views

Better approach to a complex test and report file downloads using python

I've created a very complex script using Python3 and YAML (I keep all the configurations in YAML) that in effect tests all potential file downloads for my environment. Sort of end to end test. Due to ...
0
votes
1answer
462 views

Turn on print, stderr, or stdout by tag during test run in Behave Python

So I am trying to implement an @warn tag. The idea is this test doesn't make an assertion and fail, but instead simply prints out a warning. I see this answer here, but that only explains how to do it ...
1
vote
0answers
404 views

How to extend Selenium2Library by creating new RobotFramework keywords using Selenium WebDriver in Java?

I'm trying to extend the Selenium2Library python library (1.8.0) by implementing new Robot Framework keywords using Selenium WebDriver in Java. In order to do that, I need to be able to retrieve the ...
2
votes
1answer
269 views

feature file in behave(BDD) throws an error

I have create a feature file and step definition file, to execute by test cases using behave (BDD ), but i am facing one error, when i execute the feature file, Please find below to check by code :- ...
5
votes
5answers
18k 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 ...
2
votes
0answers
631 views

New opened window using selenium doesn't appear in the window handles

I need to open a separate window from a link in my main page and leave the main opened. I am using the following code to do so: self.find_element_by_locator(locator="css==a[href='#/vehicles']")....
1
vote
2answers
12k views

Wait until in Select element using selenium

In my test, I need to wait for text until it will be loaded. I have a list of countries and cities. After I choice country I must wait until cities will be loaded. How I can wait without time.sleep()...
2
votes
2answers
15k 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. ...
-2
votes
1answer
933 views

Advantages and disadvantages of learning Python Vs learnng Javascript?

I work on automation scripts written in selenium using Java at my current job. I want to expand my skills and learn a scripting language to help with more advanced UI automation. After research I ...
6
votes
2answers
2k 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 ...
1
vote
1answer
1k 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 ...
7
votes
3answers
63k 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, "utf-8"))....
1
vote
1answer
523 views

Type Error when using DDT for Selenium

I am learning Selenium with python, so please excuse my amateur questions, I am trying to run a simple Data driven test where selenium will enter a few different names on the Name field. The Page ...
2
votes
5answers
3k 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
1k views

Issue executing Automation with Selenium/Nosetest set ups

having issue just trying to automate for the first time. I have access to repositories by GIT, where its python folders all use Python 2.7 syntax. I also have Google chrome driver as well(Using ...
3
votes
2answers
1k views

How to get start with selenium with python automation

Previously, I had worked in selenium with java automation. I had learnt page object design pattern , core java , selenium webdriver concepts. then do automate the each page has each class file and ...
4
votes
3answers
283 views

How do you set up selenium tests to run nightly, and where do you store the files?

I understand this question may look subjective, so I will do my best to make this more specific. I have created a suite of Selenium TestCases using Python. I want these tests to run each night, ...
6
votes
7answers
299 views

Detecting tests that will never fail

We have a rather big test codebase (~1500 test cases) for a Python/Django application. From time to time we stumble upon existing tests that will never fail: tests with missing assertions tests that ...