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.

-2
votes
0answers
19 views

How to close driver when internet is disconnected [on hold]

So I am automating a NetGear switch and initially connected it with local IP. What am I doing? --> Changing it's default IP address and Gateway address. Once I change IP address and Hit Apply button ...
-1
votes
1answer
19 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 ...
-1
votes
0answers
36 views

How to input values in copy/paste restricted input box

What would be happening if copy and paste restricted in input field? Will send keys method work? Using selenium python lib, and send_keys fails to fill in value in input field where copy and paste are ...
0
votes
0answers
27 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....
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 ...
2
votes
2answers
46 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
1answer
23 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
0answers
27 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
26 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
53 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
26 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
47 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
45 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) ...
0
votes
1answer
19 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 ...
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 ...
1
vote
1answer
52 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
0answers
33 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
1answer
50 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
37 views

Appium 1.10.0 + iOS : Unable to accept permission alert

Team, I am facing issues to accept the permission on iOS using Appium. I have tried below options: capabilities.SetCapability("autoAcceptAlerts", true); driver.switch_to_alert() driver.findElement(...
0
votes
1answer
130 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 ...
1
vote
1answer
42 views

Interacting witrh elements in the new link using Selenium(Python)

I am writing a Python script for interacting with the Spotify Webplayer. Initially I have to login by entering the credentials. After I click the login button and I get redirected to the webplayer ...
0
votes
0answers
172 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 ...
1
vote
0answers
56 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....
0
votes
1answer
36 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
2answers
57 views

How to handle multiple authentications in Selenium

Lets say for example that I have page A that prompts for HTTP Basic Auth. If correct login credentials are provided, user is redirected to another B site that has another HTTP Auth. How would you ...
1
vote
1answer
31 views

How to download in headless mode with selenium?

I have a test running to download files from a website, the files download okay without the headless argument chrome_options.add_argument('--headless') but as soon as I add this line nothing downloads,...
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 ...
1
vote
0answers
110 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
1answer
126 views

find_elements_by_xpath issue!

I'm trying to complete the basic python Selenium demo (https://selenium-python.readthedocs.io/getting-started.html) but I'm attempting to do that same procedure on https://www.ncbi.nlm.nih.gov/. ...
1
vote
0answers
33 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 ...
0
votes
1answer
36 views

xPath (SCRAPY) Python using two attributes together

For example : <html > <body> <a class="abcd" title="he is Gandhi"> he was good </a> <a class="bcde" > he was very good </a> <a class="abcde" title ...
1
vote
2answers
49 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
77 views

Recommended project structure for Pywinauto project

I'm used to Selenium and the page object pattern. I'm now moving to an automation project for a Windows app, so I'm discovering Pywinauto. I've be looking for good practices and was expecting ...
1
vote
1answer
96 views

Python Selenium - How to get the “Close” text to click on this button error -Unable to locate element

This is the HTML <button type="button" class="d-block p-3 mx-auto btn btn-danger btn-lg xh-highlight"> <i class="fa fa-close mr-1"> </i> Close </button> And I'm trying with: ...
2
votes
1answer
41 views

Selenium Python queston: How to extract the dynamic id generated?

I have a link inside a table with a dynamically changing id, the xpath being: //*[@id="1544727471470-1-uiGrid-0007-cell"]/a/span/span To its left is a checkbox with xpath: //*[@id="1544727471470-1-...
1
vote
1answer
113 views

How can I prompt for input using Selenium/Webdriver and use the result?

i know this has been asked before but the last time it has been answered was about a year and a half ago main point is i want to from selenium import webdriver from selenium.webdriver.common.keys ...
2
votes
2answers
330 views

How do you press two keys at the same time with Python Selenium?

Trying to do accessibility automation and want to use shift+tab to go back an element. But can't seem to get anything to work. Tried what the doc imply should work based off their "Example, pressing ...
1
vote
1answer
241 views

Python Selenium: Unable to locate element

I'd like to download the primary parcel layer from this website. First step is to click the "Add/Remove Item" button, but I am having trouble locating it. For this button, the Inspect Element window ...
0
votes
1answer
76 views

How to change the pip version in pycharm

In pycharm the pip version is showing as 10.1 but when i check the pip version in my CMD it is showing as 9.0.1. I am not able to understand why it is happening. If any one know the reason can you ...
1
vote
2answers
107 views

How to call rest API using python selenium?

I have a scenario where I need to call a rest API in my python selenium script but I am not sure how to do it. If anyone as idea on it can you please help me out . The API used is to delete the ...
0
votes
2answers
94 views

Selenium: Why find_element_by_partial_link_text finds the first match only?

What I want to do: I want to click all the links where partial text = "105611A5C7B9_Logs_" Example: First Link Text = 105611A5C7B9_Logs_11-15-18-06-04PM.tgz Second Link Text = ...
1
vote
1answer
118 views

How do you automate an OTP using python selenium?

I have a scenario where I need to perform a login, but the problem is its based on OPT (I mean once I enter a phone number to that number I receive an OTP That OTP is the password)
0
votes
1answer
40 views

How does starred expression works when using with find_element() method

def enter_text_textbox(self, locator, text): ele = self.driver.find_element(*locator) try: logging.info("# Entering text in Textbox.") ele.clear() ele.send_keys(text) ...
0
votes
0answers
66 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 ...
1
vote
2answers
117 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 ...
1
vote
1answer
288 views

Is there a way to check the font style , colour , size etc using selenium python

I wanted to know how to write test scripts to test font style, color, size etc using python selenium if anyone of you knows can you please share me the appropriate links. ('i mean study material links'...
0
votes
1answer
408 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?