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
3
votes
2answers
894 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 ...
1
vote
2answers
51 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 ...
1
vote
0answers
415 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 ...
0
votes
1answer
508 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 ...
2
votes
1answer
297 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 :- ...
2
votes
0answers
682 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
13k 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
1answer
968 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 ...
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 ...
4
votes
3answers
310 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, ...
1
vote
1answer
22k views

How to print all elements using python and selenium

I'm trying to make a code to get all the results from a specific search i do on a website. Unfortunately, I haven't been able to print all the results from the classes i need. Here is my code: #...
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 ...
2
votes
3answers
514 views

My understanding are correct or not in page object pattern

In my previous project, I worked in selenium with java. In that project I following page object pattern. This is my sample code of selenium with java: # Create Page Objects public class HomePage { ...
1
vote
0answers
365 views

Is there a way to enter automate entering credentials in the IWA and SAML popup using only python and selenium

I am trying to create an automation script for a website that supports both IWA and SAML authentication. In case of IWA, whenever I hit the URL using the selenium driver, I get a Authentication ...
6
votes
7answers
303 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 ...
5
votes
1answer
7k views

Try Assert Exceptions not failing test in python unittest or better way to loop through failures

Okay I am running Chromedriver test that gathers console logs and then tests an assertion against pythons unittest. class ConsoleLogsTest(unittest.TestCase): @classmethod def setUpClass(cls)...
1
vote
1answer
2k views

Selenium Python Action Move to doesn't work on hover element

Hi I need to click hover element in Selenium Python. I tried to use action chains and then move to element but it didn't work for me. My Selenium code Snippet: element1= self.driver....
1
vote
1answer
494 views

Can you create a Page Object Model framework inside of TestComplete?

I have some experience with using Selenium and Python to set up testing frameworks for web applications using the Page Object pattern. However, my current employer wishes to keep all of our tests ...
0
votes
2answers
851 views

Python selenium - multi window question

I need to open two browser windows at the same time. For example, when browsing a page in a window and if I click on the link present in that window, that link (URL) should open in a new browser ...
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 ...
1
vote
2answers
3k views

Validation of a Success or Error Message in Python, using Selenium

Hi I have created a script to validate for the success or error message after filling the form, but it is throwing an assertion error for everything. Please help me out in fixing this error, Here is ...
2
votes
3answers
204 views

Install chromedriver via package instead of executable

Currently I am working on a selenium webdriver project using python. My tests run only in chrome (when the executable file is present in the project). Is there an updated alternative to install the ...
4
votes
4answers
32k views

How to make a selection from a dropdown using Selenium/Python

I've been trying to make a selection from a drop down but cannot seem to figure out how. Here's what I'm trying to get: <div id="quote-status" class="panel panel-default"> <div class="...
1
vote
3answers
3k views

ElementNotVisibleException when selecting dropdown option

I can't make Select() method working in selenium. I have this code: <select class="print-select menuo selectBox" name="data[gimimo-m]" style="display: none;"> <option class="dis-option" ...
0
votes
1answer
497 views

Selenium python test hung up on url in cronjob

My automated tests get hung up on the .get(url) command randomly. I run several test suites everyday against 60+ different urls (each suite) and a handful will fail to get the url after initializing ...
3
votes
2answers
924 views

Functional/Black Box tests automation library on Python

Summary: I have to test embedded software which runs on qemu virtual machine or on real device and can write its output to stdout. So I can check the state of software only by parsing stdout. To ...
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 ...
2
votes
3answers
950 views

Robotframework & Selenium2Library & Python - User sign up test problem (emaill address +n generation)

I am beginner in writing automated tests with robotframework(Python and Selenium2Libraries) and I've faced to the issue related to user registration flow. Challenge is: The application under test ...
3
votes
2answers
140 views

A testing tool that determines whether a section of HTML matches a certain style?

This may be a long shot, but suppose I have a requirement that a given section of a web page be bolded. That could be done with <b> or <strong> tags, or even a heading tag assuming that ...
1
vote
2answers
13k views

ROBOT FRAMEWORK: [Error] Parsing ___.robot failed: Data source does not exist

I just setup Robot Framework yesterday. I went to youtube to see some videos on how to set up and I found one that was just uploaded last month. I follow all the steps and I numbered it below. ...
1
vote
1answer
3k views

Iterate Clicking via nested loops? - Python and Selenium

Just a heads up, this is my first post on here so if I violate any of the posting rules please let me know! Currently, I am attempting to : Find WebElements(Hyperlinks) in a Dashboard Table to ...
1
vote
1answer
78 views

How should I organise my test-pack to allow me to share an stb-tester ONE between multiple projects?

I'm using the stb-tester ONE to test my set-top box. The Python test-cases are stored in a git repo on the device. I'm about to start a new project and I'm wondering how I can segregate the test ...
2
votes
1answer
59 views

Why do I see lower latencies when using stb-tester than with a camera and a TV?

I'm using stb-tester to measure the latency of my set-top box UI. The test script looks like: def test_measure_latency(): stbt.press("KEY_MENU") start = time.time() m = wait_for_match("...
1
vote
1answer
128 views

How can I get test-results from an stb-tester ONE in CSV format

I'm implementing an automated testing system the stb-tester ONE. I've been able to run tests automatically using the REST API and now I'm implementing the Test Reporting module. I want to be able to ...
1
vote
4answers
75 views

Question about find_by_elements

When you use find_by_elementsit returns a list of all the elements which correspond to an selector, xpath, class, id , etc... However I wanted to know if it's possible to extract an element of this ...
1
vote
1answer
705 views

Selenium - Why driver.quit doesn't work in the following case?

I'm writting some scripts on Selenium combined with Saucelab. However I have an issue. I do a test condition to know if I have an element or not on my page, if there is not this element I want to stop ...
4
votes
2answers
2k views

python unittest trying to run setUpclass

I am on a website where you login, then search for course, click on course and then it lands on the Credit card page, since its just one course and is common and I am just trying to run DDT on CC ...
2
votes
1answer
414 views

New browser window every new iteration

I need to open every new iteration, new browser windows. For example: class GoogleTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.browser = browser_incognito....
3
votes
3answers
740 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
2answers
946 views

Selenium send_keys on chromium confused by forward slashes

I am using selenium webdriver under python on a Debian jessie machine. The browser I am currently testing is Chrome (version 55) with chromedriver (version 2.27). If I send the string 1/2/3 to a ...
1
vote
2answers
261 views

What is the best way of separating tests from keywords using RobotFramework?

Our team wants to migrate the tests from QTP. We have the automation flows for UI, API and some database tests. After a long research, I found robotframework would be a nice tool.However as I started ...
1
vote
1answer
570 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
2answers
9k views

Getting correct locator for an angular page element

I am trying to get the Xpath of a label text in a web page that I am trying to automate. The application is angular based, so there are a lot of angular related stuff on the page. However, I am ...
1
vote
1answer
269 views

selecting from drop down list using selenium3.0.2 and python3.5.1

This is my first question in OS and I would describe it in details with my best effort. Selenium3.0.2 firefox 45.6.0 geckodriver 0.13.0 python 3.5.1 (with Anaconda 2.4.1 (64bit)) What I want to ...
3
votes
1answer
3k views

Python-Selenium: Title is returning empty on website when using Firefox

I am having this weird issue where when I use: title = driver.title print('Title is: ' + title) the title returns blank or empty, it returns blank only on Firefox and with our internal website. When ...
2
votes
1answer
949 views

Obtaining a Dropdown list items and their dynamic ID using Python 3.x and Selenium

i have a simple problem i am trying to automate the testing of a website that has a lot of dropdown lists that are populated dynamically. I wish to be able to obtain all of the ID's (They populate ...
8
votes
0answers
325 views

Error: Unable to find window while the window is already displayed in LDTP

I'm using LDTP to write a GUI test case script in python. I'm running the script in a virtual machine by nosetests. And I get block with the error of unable to find window X ,while window X is ...
4
votes
3answers
498 views

How to perform static code analysis?

I am working as QA.I want to test the static code analysis of my project. How to get start this ? Can you suggest a good tool to perform static code analysis ? My project is running in php, python, ...
1
vote
2answers
449 views

Use an if-statement to ensure that an element is not present

I would like to use a if statement to ensure that an element is not present without rising a NoSuchElementException. So for example: if(driver.find_element_by_xpath("xpath")): print " This ...