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 ...
2
votes
2answers
297 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 ...
1
vote
2answers
41 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
2answers
89 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
2answers
183 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
2answers
34 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')]"): ...
0
votes
2answers
34 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 ...
0
votes
2answers
154 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
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
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 ...
3
votes
1answer
122 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 ...
1
vote
1answer
289 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
37 views

Selenium: how to prevent a just-started Chrome window from receiving focus

Using Selenium + chromedriver on Linux, like so; chrome_options = Options() driver = webdriver.Chrome('/usr/bin/chromedriver',options=chrome_options) driver.get('https://www.somewebsite.com') Chrome ...
0
votes
1answer
45 views

Issue using xpath

I'm having an issue. I'm using Selenium and PyCharm. Website: https://www.expedia.com/ I'm trying to click() on the "Search" button. I used these: driver.find_element(By.ID, "search-button-hp-...
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
59 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
373 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 ...
0
votes
1answer
40 views

python dryscrape how to select child element

I'm working on a project with www.NJMLS.com. I'm try to extract email of agent name "Edward An" import dryscrape as d d.start_xvfb() br = d.Session() br.visit('http://www.njmls.com/members/index.cfm?...
0
votes
1answer
28 views

login for https url having https different url for browser popup in selenium python

I have url https://dc1-common.naops.exu.xxxx.se/cgi-bin/index.pl and after entering I got another url https://dc1-common.naops.exu.xxxx.se with Sign In Browser pop up which requires for Authentication ...
0
votes
1answer
706 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
576 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
1answer
158 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 ...
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,...
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
1answer
266 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): ...
-1
votes
1answer
55 views

Pop up handling in Selenium using try and except block gives a broad exception warning

try: if browser.find_element_by_xpath('//[@id="s"]/a').is_displayed(): browser.find_element_by_xpath('//*[@id="s"]/a').click() browser.switch_to.default_content() ...
-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" ...
8
votes
0answers
297 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 ...
2
votes
0answers
610 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
0answers
75 views

Appium 1.10.0 + Android : Unable to accept permission alert

Team, I am facing issues to accept the permission on Android using Appium. I have tried below options: capabilities.SetCapability("autoAcceptAlerts", true); driver.switch_to_alert() driver....
1
vote
0answers
212 views

Attach Existing browser session in SeleniumLibrary RobotFramework

I have an LDAP alert box that pops up as soon as the browser is opened. I am Using Robotframework with the seleniumlibrary for my automation scripts.The issue is that the execution of the script ...
1
vote
0answers
35 views

Testing of console tools

From my previous experience, I am used to write tests for either unit testing or integration/deployment testing. Now I am facing the challenge to write automated tests for a console tool using a ...
1
vote
0answers
584 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
393 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 ...
1
vote
0answers
344 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 ...
1
vote
0answers
305 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 ...
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
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 (...
1
vote
0answers
3k 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
0answers
16 views

How can I improve this python pytest excel data handling code? Does pytest have something like TestNG dataprovider?

Does Python Pytest have anything similiar to Java TestNG DataProvider where you can pass in a set of data for the tests? I created something to take the data from my excel list using openpyxl and it ...
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
0answers
160 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
37 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 ...
0
votes
0answers
124 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
21 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....
0
votes
0answers
12 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
0answers
32 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
0answers
42 views

Autosuggest with selenium and python

I have below requirement to do the automation using selenium and python. Can someone please help me with the code: Enter the exact query string in the search box In the auto-suggest, the exact name ...
0
votes
0answers
353 views

Running Selenium and Headless Chrome on AWS Lambda using Python

I need to do a Proof of Concept of whether I can run Headless Chrome on AWS or not and I tried to implement the solution from the below link: Running Selenium and Headless Chrome on AWS Lambda ...
0
votes
0answers
114 views

Is local storage not persisted when using remote WebDriver?

Initial setup setUpClass creates a remote webdriver instance (because I don't want the overhead of creating a browser session per test) using Chrome, goes to the login page, enters credentials and ...