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
1
vote
3answers
4k 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
513 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
1k 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
1k 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
152 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
15k 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
4k 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
82 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
65 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
140 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
80 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
753 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
445 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
806 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
276 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
622 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
272 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
1k 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
342 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
519 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
622 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
16k 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
321 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
316 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
700 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
5answers
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
111 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
504 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
7k 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="...