Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. 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
0
votes
2answers
3k 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
281 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
1k 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
46 views

how to use assert in selenium python to check my page load time is less than 5 sec?

start2 = datetime.datetime.now() button8 = driver.find_element_by_xpath("//span[contains(text(),'Last Month')]").click() timeout = time.time() + 60 * 2 while len(driver.find_elements_by_css_selector(...
0
votes
1answer
29 views

See Test Steps in Python when using selenium

I'm converting some manual tests to Python and using Selenium to test them. Currently the manual steps are written like to: Requirement 1 - Can add new person, if none exists Step 1 - Search for ...
0
votes
1answer
82 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
67 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....
0
votes
3answers
247 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-...
-1
votes
1answer
44 views

Problem with checking if prices are between two values (Selenium + Python)

URL = http://practice.automationtesting.in/shop/ I need to check if the prices of the books are between two values. I tried to find all the prices: prices = driver.find_elements_by_xpath("//*[@class='...
1
vote
1answer
45 views

Can't select price range (Selenium + Python)

I have a small test case: Open the browser Enter the URL “http://practice.automationtesting.in/shop/” Adjust the filter by price between 150 to 450. I tried to use ActionChains, but no result. ...
1
vote
1answer
173 views

Check if password field displays masked characters (Selenium + Python)

I'm new to automation testing, so I have a question regarding the code that I used to execute a simple test case: "Check if password is masked". 1. Open the browser; 2. Enter the URL “http://practice....
0
votes
3answers
122 views

How should I fail a test when an if condition becomes false

I want a test to fail when the if condition below becomes false. last_url = self.browser.current_url if 'https://***/news/' in last_url: print("test passed") else: #Test should fail if it ...
0
votes
1answer
212 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
2answers
3k 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 ...
0
votes
1answer
38 views

How to write test that have same code in the beginning?

I am writing test automation for the application that have following features Login Create News Create Event In Create News and Create Event I have to repeat login code. Is there a way to use login ...
1
vote
1answer
6k views

How to open browser with extension already enabled

I get the following code to open chromedriver with extension but this extension is disabled, Is there any way that when chrome is launched, it launch with enabled extension - chrome_options = ...
1
vote
2answers
37 views

Can not choose button with the same name (Windows)

The problem I have two buttons with the same name in Windows program. So I do: "self.driver.find_element_by_name("button name").click()" - it selects the first one, but I need the second one. I ...
0
votes
1answer
2k 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
votes
1answer
75 views

In Selenium using Python facing error unable to locate element

from selenium import webdriver from selenium.webdriver.common.keys import Keys # create a new Firefox session driver = webdriver.Firefox() driver.implicitly_wait(30) driver.maximize_window() # ...
0
votes
0answers
37 views

Open a clickable link on a web page and take the screenshot at the same time

I'm new to chrome headless and I have a problem. I want to randomly select two links from a web page on the page being viewed and open them at the same time. Indeed my goal is to be able to have the ...
-1
votes
1answer
32 views

Testing Question in Selenium Python

How to get required item hrefs in a flipkart page? This is my code: from selenium import webdriver driver = webdriver.Firefox(executable_path ="/home/yegaiah/Desktop/geckodriver") website_URL ="...
1
vote
1answer
729 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 ...
0
votes
3answers
80 views

How to identify the web-element for a Text Box using Selenium

I am attempting to locate the empty textbox by the input id 'Department_input' <input id="Department_input" type="text" aria-required="true" size="40" class="field_input ui-widget-content" ...
0
votes
1answer
145 views

Need help sending text to field

Using Python and Selenium, how can I send text to an element that is 'hidden?' When trying to do it, I am getting errors that the element is obstructed by another element. The field I am trying to ...
0
votes
2answers
7k views

WebDriver - Problem with loading profile of Tor Browser Bundle

Could you give me any suggestions how to solve the weird problem I experience with WebDriver? I like to use WebDriver to control the browser from the Tor Browser Bundle (TBB). Controlling the TBB via ...
2
votes
3answers
214 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 ...
1
vote
2answers
50 views

Are there any good links and references for learning how to create an Appium Python Framework?

Are there any good links and references for learning how to create an Appium Python Framework? There seem to be a lot of Java information out there, but Python seem to have a lot less available ...
1
vote
1answer
236 views

Selenium can't click href

I want to click on a href(all of the delete ones), but can't <a href="#delete"><img height="16px" width="16px" src="/images/icons/trash_16.gif"></a> I've tired (both delete and #...
3
votes
2answers
6k 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
1answer
225 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 ...
0
votes
1answer
36 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
1answer
1k 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
0answers
12 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
277 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
49 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
2answers
953 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 ...
-1
votes
1answer
69 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
0answers
455 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
29 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
50 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
18 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
109 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
36 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
173 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
35 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
76 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
47 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
37 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
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 ...