Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [python]

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

1
vote
3answers
1k views

Python selenium grid parallel execution

How do I run parallel selenium scraper in grid? I wanted to crawl 10 urls , and if I start two Firefox nodes, how do I request the nodes to crawl 5 urls in parallel? I have gone through google, but ...
3
votes
3answers
2k views

Fetch all the links on a page that are within the same class

Quick Links <span class="buttonContainer"><input type="image" class="helpButton" src="/images/buttons/btn_help.gif" alt="View help." title="View help."><input type="image"...
1
vote
2answers
66 views

Python Selenium unable to login by clicking on Button inside a form

website:https://www.etoro.com/login <button automation-id="login-sts-btn-sign-in" ng-click="loginCtrl.login(loginForm)" class="e-btn-big wide dark pointer">Sign in</button> I am trying ...
1
vote
1answer
32 views

Selenium | Locate elements via custom attribute

I'm new to test automation with Selenium (Python) and just wondering if it makes sense to locate elements on webpages via a custom attribute? In some places the IDs of the elements are generated and ...
2
votes
2answers
28k views

Verifying if an image Is displayed on a webpage

I have read that there is no "sure shot" way of knowing that an image is loaded or displayed on a webpage using Selenium. I want to know the reason behind it, as to why this is completely not possible....
0
votes
1answer
16 views

Adding Chrome extension in Selenium / Python / Ubuntu

I am having problems in adding extensions in Chrome before Selenium tests, using Python. On the code side, it's pretty simple: options = Options() options.add_extension(/path/to/extension) webdriver....
0
votes
3answers
313 views

Getting error : NoSuchElementException - Unable to locate element with ID attribute

I am running this code: from selenium import webdriver from `selenium.webdriver.firefox.options` import Options Setup: options = Options() options.add_argument("--headless") def get_results(...
2
votes
3answers
180 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 ...
0
votes
2answers
31 views

Strange drop down automation problem - multiple select

I've tried for days to figure this one out. I have a selector that I can't figure out. It seems to be a regular select statement with multiple options but when clicking one option directly it ...
1
vote
1answer
233 views

Selenium Python - Unable to find an element, get stale element exception when using element locator

Scenario: 1.Login to a website using script and navigate to the Home page. 2. On the home page, click a link and navigate to a new page. 3. Then navigate back to the home page using the top navigation ...
0
votes
1answer
251 views

Sometimes Appium clicks on some buttons with a very long delay (on some views)

While testing by appium (using python), it clicks on some buttons with a very long delay on some views in my android app. Method, which I am using: def click_element(self, element, time=wait_time): ...
0
votes
2answers
140 views

SyntaxError: invalid syntax // SyntaxError: unexpected EOF while parsing

How do I detect text inside of this, this is HTML & this is XPath. I tried HTML <span class="messageText">Hello.</span> XPath //*[@id="liveAgentChatLogText"]/span[22]/span[2] ...
0
votes
2answers
30 views

Python Selenium code is not able to double click on a webelement when multiple tests are run together but works when tests are run individually

Posting the code snippet for abc in self.driver.find_elements_by_xpath( "//div[@class='ag-body-viewport']//div[starts-with(@class,'ag-row')]"): ...
1
vote
2answers
147 views

To work with two different drop downs which are dependent on each other

I have a scenario in which i am finding bit difficult to automate . The test scenario is : There are two drop down . 1.To select the state. 2.To select the respective cities. So i need to write a ...
0
votes
1answer
803 views

Does implicitIwait affect set_page_load_timeout python, selenium, chrome driver

I have a scraper where I have: driver.set_page_load_timeout(30) and driver.implicitly_wait(10) Does implicit wait affect the driver.get() call? I was wondering if my 10 second implicit wait ...
0
votes
2answers
32 views

Can't switch control on elements of a chatbot using selenium in python

I am trying to send a message as input to chatbot to check the response but when I am trying to send a message to a chatbot, I need to click on the input box where one can enter a message. But it is ...
2
votes
2answers
286 views

Automated GUI Testing HTML embedded Desktop Application

I have the exact same problem as in this post Automated GUI Testing of MFC/Dynamic HTML embedded Desktop Application This were an old post but maybe there are new solutions available. I have written ...
0
votes
1answer
2k views

How to save an webpage as a xml file using Python and Selenium?

I want to open an xml webpage and after opening the webpage, I want to save the xml content displayed in the webpage as file1.xml file. What I tried: from selenium import webdriver import os from ...
0
votes
0answers
10 views

Jython or Groovy script: Check if a cookie has already been closed

Currently I have the following problem. I use a test framework (QfS) which offers the possibility to execute scripts via Groovy or Jython. Description: I've automated the history that I can close ...
0
votes
3answers
1k views

Python Selenium Find Button

I have a Website were I want to click a button, but I can't find in the button in the HTML script, what I have to write in my Python script? Later I want to have something like driver....
0
votes
0answers
67 views

could not be scrolled into view - loop over options of menu

I have a page in which you click on date first, then region and finally province and get a link to download a file. I am trying to create a loop that goes throuth all the dates, regions and provinces, ...
0
votes
0answers
31 views

Why can Selenium not find an element in a page via XPATH when I can by pasting it and all other XPATHS work?

I would share the link here but I'm under NDA and requires login. The site does use "ant" and some other dynamic things but that doesn't cause any other issues. I've roughly 50 xpaths used for various ...
3
votes
1answer
121 views

Approaches for testing huge data files in text format

My current assignment requires me to test data in a large number of text files ~ 200, usually ranging between 1GB to 20GB. The data is in same schema with coordinates. As of now the approach is to ...
0
votes
1answer
21 views

How can my mac be setup to run both appium/selenium with java and python without conflict?

How can my mac be setup to run both Appium/Selenium with java and python without conflict? Are there steps I should take and things I should avoid? What things should I look out for? My mac is setup ...
0
votes
1answer
544 views

Call Python class in JMeter

How can I call python class in JMeter to test the performance of the python code as we do in java by importing jar file and write a script in BeanShell?
0
votes
1answer
43 views

Unit testing for chains of generators in Python

I want to write unit tests for methods that take a generator as input and produce a generator. I am building on this answer. For this question let's take the method: def candidates_for_deletion(self,...
3
votes
2answers
871 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 ...
0
votes
2answers
2k views

Can't find any element using CSS selector with Selenium on Python

I'm running a script on vodafone.co.uk but I can't find any element using the CSS Selector. browser.get("http://freesim.vodafone.co.uk/") browser.find_element_by_css_selector("#frmNew > div:nth-...
0
votes
1answer
143 views

Unable to capture the alert in Selenium using Python

I am trying to test a web portal using Selenium and Python. The problem is, I am unable to get around an error, in other words, I am unable to catch the alert. Scenario: Search for a user, if the ...
-1
votes
1answer
25 views

Mac + PyCharm + Python 2.7: ImportError: No module named appium

I just changed PyCharm application from Professional to community and in my v first run I am getting below error. Prior this all tests was working correctly as expected: ImportError while importing ...
0
votes
1answer
485 views

How to run Robotframework test cases in a particular order from different suites?

We have at least ten test suites each having at least 10 test cases. I would like to know if there is a way to run selected tests from each of the suites in an order I would like? For example with ...
0
votes
0answers
53 views

Selenium Python ->Browser zoom

I have a problem with browser zoom in Google Chrome and FireFox I have one button what overlap by another element(my page always have 100% zoom it is very bad for me because a lot of elements are ...
0
votes
0answers
16 views

Jenkins : ERROR: SEVERE ERROR occurs org.jenkinsci.lib.envinject.EnvInjectException: java.io.IOException: Unable to find the login form

I am trying to integrate 3rd party build aws for Automation using Jenkins [version - 2.73.3] I observe below error: ERROR: SEVERE ERROR occurs org.jenkinsci.lib.envinject.EnvInjectException: java....
2
votes
2answers
47 views

How do you test an application that uses current time?

In an interview, they asked me to write a program to get current (live) time of given states in a list. I have written the code for it and was asked to tell how I would test the program to check if ...
0
votes
0answers
10 views

How to select NGXTELLINPUT (International Telephone Input for Angular js) field?

I am unable to Use SELECT class on NGXTELLINPUT field for angular with SELENIUM using python because there is a list inside DIV tag of Input , and it is throwing a same error every time that "SELECT ...
0
votes
1answer
56 views

How can I set the language of Safari and launch using Selenium?

I need to launch the Safari browser for automation with a specific language(Korean) for automation purpose. I am using selenium with python for automation. How can I do that ?
0
votes
1answer
76 views

Test Impact Analysis tool for Python

Is there a Test Impact Analysis (TIA) framework/tool/extension for Python? E.g. an equivalent to JAVAs Test Impact Analysis Plugin for jQAssistant?
0
votes
0answers
30 views

PyCharm Debugger, Selenium Question

I used the following line in my code content = driver.find_element_by_css_selector('div#pnllvAimEvidence table ul li:nth-child(1) a') Then I had the debugger stop on the next line to examine '...
0
votes
2answers
63 views

Reading values from CSV file and convert it to json in python [closed]

my code : import csv import json with open('file.csv', 'r') as f: reader = csv.reader(f, delimiter=';') data_list = list() for row in reader: data_list.append(row) data = [dict(...
0
votes
2answers
27 views

Loop Phyton / Selenium [closed]

I have a piece of code in Pycharm , and I want to loop just a part of it, not with the beginning part where are located the login info. Let's say that I want to loop from the 44 line to 99 and only ...
0
votes
1answer
13 views

Page doesnt change / next

Why the page doesn't change but also don't receive an error in console. Can someone plase help me in this case? Thank you driver.find_element_by_link_text("»").click()
0
votes
2answers
50 views

Can't click a button

I have this code: Hi , a have a problem clicking a button. driver.find_element_by_xpath("(.//*[normalize-space(text()) and normalize-space(.)='Editează'])[20]/following::a[1]").click() And I ...
1
vote
1answer
46 views

Problems with login

I have this code: Enter Username or Email elem = driver.find_element_by_id("id_username") elem.send_keys(user) Enter Password elem = driver.find_element_by_id("id_password") elem.send_keys(pwd) ...
2
votes
1answer
31 views

Unable to locate button in Selenium using Python

I have this HTML code: <button> class="btn btn-lg btn-primary btn-block" type="submit">Autentificare</button> input type="hidden" name="next" value="/"/ Using below locator I'm not ...
2
votes
2answers
3k 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
2k views

How to get Embed link from Openload API after Remote upload? Selenium & Python

im trying to use Openloads API in python, i can do a remote upload like this: ol_url = driver.current_url resp = ol.remote_upload(ol_url) file_id = resp.get('id') Now i have a file uploaded in ...
10
votes
3answers
1k views

Python coverage and external executables

I have a project that has almost complete unit test coverage. There's only one statement that isn't covered and I can't work out a good way to do so. Say the project is called foo, I have foo/commands....
1
vote
1answer
138 views

Selenium python drop down menu select

I need to select an element from a drop-down menu. The dropdown menu has two value and I need to select the second "sponsor.com" <select tabindex="1" name="userDomain" onchange="javascript:...
0
votes
0answers
18 views

Needs inputs on selecting Python Automation Framework [duplicate]

Need Ideas for selecting a python automation framework for my Project which interacts BigData applications like Spark, Hbase, Kafka, etc...
0
votes
1answer
232 views

How to get src link using Selenium?

The task is simple: to extract the link of an audio of pronunciation for a word from a Yahoo Dictionary Webpage: e.g. Yahoo's Dictionary@ "real" Using "Chropath", I can locate the Xpath of the ...