Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
2
votes
1answer
63 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
132 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
79 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
735 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
440 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
781 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
1k 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
270 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
600 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
11k 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
4k 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
985 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
341 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
517 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
548 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 ...
2
votes
2answers
15k views

Find an element with two class's attributes on Selenium

I have a board where days of the week are the column and people's name are the rows, So I can use two parameters to find the cell of an employee for a certain day: data-user-id='30646 and data-shift-...
2
votes
1answer
6k views

Find an element in Python with Selenium which appears by hovering it

I'm trying to write a script to test an option of a website, this option enables users to edit their own message and so it's represented by a pencil icon which has the xpath: "//*@id='content']/div[...
1
vote
1answer
2k views

Syntax error with a if / else statement (Python / Selenium)

I'my trying to apply an if / else statement in Python to know if I have an element or not and if it is the case, click on it. But I don't know why I have a syntax error and I don't see where I have ...
1
vote
4answers
3k views

What to do if Relative Xpath is keep on changing [duplicate]

Below are my xpaths and keep on chining, Element path <div class="dijitInline utilizationTitle">5.00%</div> Here need to capture values (5.00%).... Element Xpath //*[@id="...
1
vote
0answers
318 views

Unable to run zap scan script using Zap python client

I have written a script to scan URL using zap python API, I am using Ubuntu 14.04, Python 2.7 and Zap 2.5 version. I have installed zap by following these instructions. When I try to run, I'm getting ...
0
votes
2answers
1k views

Building test cases to check text strings in multiple languages in Webdriver / Python

My group usually doesn't handle web testing, but for this project some of it falls on me and I'm working out automation as I go. The site isn't public, or I'd just provide it for reference. Using ...
1
vote
1answer
1k views

Selenium unable to identify div element

I'm trying to access the div element by it's content (which is text) using the xpath, but it's not able to find the element. I have a number of td items: <tr role="listitem"> <td class="...
0
votes
2answers
305 views

Need To Copy Source Code of CMS Page in Python Webdriver

I am new to selenium 2.53.6 and Chrome webdriver so I may have overlooked something very simple. I need to copy the source code of a CMS page in Python 3.3.6 webdriver. I have tried page_source ...
1
vote
0answers
40 views

How to create permanent load with The Grinder

I want to set grinder.properties so, that my grinder.processes will start one right after another to provide permanent uninterrupted load (some kind of reliability testing). I checked that one process ...
1
vote
1answer
3k views

CSS Selector using ':contains' fails with `invalid element state: Failed to execute 'querySelector' on 'Document: is not a valid selector'`

I'm new to Selenium. I'm using it with Python. I'm trying to use a CSS Selector with :contains but failed so far. On Chrome, the selector is rejected with 'a:contains("mail")' is not a valid selector ...
1
vote
1answer
4k views

Button not clickable with Selenium

I'm having a problem with a Cancel button which can be clicked manually, but fails when I try to get Selenium to click on it. The button is being identified, but when I assert if the button is ...
0
votes
2answers
1k views

Assert multiple Id's using for loop in selenium and python

I want to assert all ids in the list with for loop, my code is not working: list = ["'block-views-news_of_the_day-block_1'", "'views_slideshow_singleframe_main_carousal_new_block-block_1-2'", ...
2
votes
2answers
4k views

Automation halts when browser popup appears in chrome for robot framework

I am using latest version of chrome 53.0.2785.57 beta-m (64-bit). When I execute my test script, at a point of time when deleting a line item chrome default confirmation popup appears and test fails ...
0
votes
2answers
669 views

No redirection after clicking on <div>

I am trying to automate clicking on a button of a webpage where the source code has the following structure: <div id="ctl02_" class="sel"> <div id="Lo" class="cont"> <...
0
votes
2answers
2k views

Want to click on last button in row in python selenium

I need to click on the last button (CurrentPageUp) in a row. xPath does not work since nr of buttons change frequently. I tried find_element_by_xpath('//*[@id="ShowProducts_PagesTop"]/span/button[...
1
vote
4answers
2k views

How to log out in facebook using python selenium?

I want to know how to log out in facebook using python selenium. here's my code: from selenium import webdriver from selenium.webdriver.common.keys import Keys import time #from selenium folder ...
1
vote
2answers
110 views

A logical “or” inside a Selenium test case

Assuming I would like test for a default Apache server response at one point, and I would like to make it platform agnostic. For CentOS I have: def test_web_interface(self): self.driver.get(...
1
vote
1answer
489 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 ...
1
vote
1answer
673 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,...
0
votes
3answers
2k views

Can't get Selenium to select option

I have been trying for a long time to get Selenium to select an option from a drop down select field. It appears not to be selecting the element whatsoever. Could the fact that it requires a reload ...
5
votes
3answers
6k views

Python based test automation tools for desktop applications

I have some experience as a manual tester and at my current work our regression testing takes about 2 days. I am planning to start automating some of the test cases. I am looking at some of the free ...
5
votes
1answer
1k views

How to retrieve httponly cookies with IE selenium driver?

By my research so far, IE selenium webdriver (for IE10 or 11) is not able to retrieve httponly cookies. So code like this can return a full set of cookies including those set to httponly if I am ...
1
vote
0answers
31 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 (...
2
votes
2answers
3k views

How to access a web page INPUT element using selenium python

Below is my website content <input type="text" title="Query for bugs (&quot;Go box&quot;) [Alt-K]" name="Go" id="GoText" size="23" onkeypress="GoBoxKeypress(event)" onblur="...
1
vote
1answer
168 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 ...
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 ...
1
vote
0answers
4k views

How to use selenium.captureNetworkTraffic in Python?

I'm interesting in debugging my browser session and I found that it is possible to save http requests with their answers to a file using captureNetworkTraffic in json format. But I can't find any doc ...
0
votes
2answers
1k 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
2k 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 ...
2
votes
3answers
693 views

webdriver.support.select - Select doesn't interact with the element

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
15k 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
1k 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
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 ...