Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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

0
votes
1answer
37 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() ...
0
votes
0answers
3k views

ElementNotVisibleException: Message: element not visible Selenium in Python

I'm trying to click an options from a website dropdown menu but I am not able to click. I am using "xpath" locators for the element and I upgraded my chrome to the latest version for chromedriver. ...
0
votes
1answer
43 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
0answers
34 views

How to send XML POST request with query parameters in Python

I am writing a python code to simulate the action that am doing in SOAPUI. Here is what am doing in SOAPUI Below are the post methods: I have a endpoint+recourse Select method as post Parameters ...
1
vote
1answer
43 views

Selecting usernames from a list using selenium

This is the code I have used so far: username = browser.find_element_by_id("field67041336") email = browser.find_element_by_id("field67041337") mobile = browser.find_element_by_id("field67041338") ...
1
vote
1answer
48 views

How to properly mock dependencies

My code is organized as several independent classes. Each dependency is injected by a setter, so in the end I create instances of classes B and C, set their parameters and inject them to class A. Now ...
0
votes
1answer
27 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
71 views

How to make while loop for example 5 automatic registration account

How to make while loop for example 5 automatic registration account this is my code and I want to make an automatic python script for 5 registration account from selenium import webdriver driver = ...
0
votes
0answers
38 views

selenium element.text() different on two different computers

What would make element.text() give different outputs on two different computers? I wrote a scraper with python and used pyinstaller to make it into a .exe file. I am using the same file on each ...
0
votes
1answer
143 views

How do I use find_elements_by_xpath to only get some elements in python selenium?

How should I use driver.find_elements_by_xpath() to get all the data-row elements that I boxed in the picture. I do not need the other tr tags. In my current code I just check all the tr tags and ...
0
votes
1answer
80 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
20 views

How to write two value in same row csv with python

I have two informations (number of men and number of women) and I would like to store them in the same row of the csv named (population): nb_femme=soup.find_all("text", {"class" : "...
1
vote
1answer
58 views

How do I remove unnecessary console message pop up using selenium with Python?

When I used Chromedriver with selenium in python, I get a lot of console messages that are not useful to me and that don't affect my scraper. How do I not output these? I do not have this issue when I ...
0
votes
1answer
20 views

How to test a class that wraps methods connect to a remote database

I wrote a class creating connection to a remote database, query and do some more actions on that. Which is the best way/ strategy to test that kind of class? I tried to mock third party functions ...
0
votes
0answers
19 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
25 views

Architecture unit testing for Python?

Is there an equivalent to the JAVA architecture unit test framework ArchUnit for Python?
0
votes
0answers
107 views

Selenium web driver issue with Action Chains drag drop when native functions work fine

While trying to automate using Selenium webdriver and python I am facing the following issue: Simple click is working without action chains class: element.click() But trying to click is not working ...
0
votes
2answers
264 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-...
1
vote
1answer
71 views

What Python tool support automation of Sciter based desktop application

I have been using pywinauto for automation of desktop application. This tool was fine until we started using Sciter (see https://sciter.com for more info) on some screens. Pywinauto supports Win32 API,...
0
votes
0answers
30 views

Run a selenium script on selecting the script from a multi-select in django

on a webpage there is a multi-select drop-down, once user selects any option from the drop-down, the required selenium script must run. index.html <div class="form-group"> <label class="...
1
vote
1answer
551 views

Download pdf in headless chrome and selenium

Script.py profile = {"plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], # Disable Chrome's PDF Viewer "download.default_directory": source_dir, "download....
0
votes
0answers
24 views

How can I make the login page methods static for selenium scripts?

Below is my code for my login page, I tried to make these methods @staticmethod, I tried to do the same by adding the @staticmethod syntax , but the problem is , after that i cant access self.driver ...
0
votes
1answer
43 views

Performance issue - Robot Framework vs Python

I am currently working on the development of a keyword that allows to separate the contents of a text file into 2 parts and create 2 new files containing each of these 2 parts. The file format is ...
1
vote
0answers
18 views

how to plot multiple locations in google.map using flask [closed]

i'm traying to showing multiple points in map from a csv file named 'likibularochelle_test.csv' this file contains 866 points with latitude and longitude but i can't view all of this points just 33 as ...
0
votes
1answer
69 views

Get certain text from website using Selenium

I'm trying to copy a certain string of a website's source code using selenium. This is the page's source code: <body data-gr-c-s-loaded="true">{"url":"https:\/\/shop.website.com\/cart\/...
0
votes
0answers
86 views

Python Kivy ScrollView is not scrollable

from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import ScreenManager, Screen from kivy.core.window import Window Builder.load_string(""" <But@Button>: ...
0
votes
1answer
43 views

Python stops after opening webdriver

from selenium import webdriver driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chrome.exe") driver.get("https://www.google.com/") Hello, I am new to selenium and i have ...
1
vote
1answer
32 views

How do I put validations or assertions in choosing the particular file format?

I am using Robot Framework with Python and Selenium. I need to verify that files have the correct format: specifically that they are image files (e.g.: .jpg, .jpeg, etc). How do I use validations or ...
0
votes
3answers
1k views

ElementNotVisibleException: Message: element not visible

I've seen this error everywhere, but none of the solutions have seemed to work. This is my code: contpayment = driver.find_element_by_class_name('nsg-bg--nike-orange') contpayment.click() Python/...
0
votes
0answers
52 views

Selenium Python - go to the next pages

I am currently writing a python selenium script to scrape the "Likibu.com",it is a website that offers short-term accommodation such as Airbnb, booking ... I have successfully got all data that exists ...
0
votes
1answer
69 views

Error while executing javascript code in python3 while using selenium

I was trying to remove the ad and other pop-up using selenium after opening the webpage. The pop-up is getting removed but the ad is not getting removed. There is some error in executing javascript ...
0
votes
1answer
167 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 = ...
0
votes
0answers
38 views

using selenium with oracle JET applications

I am trying to write some python selenium scripts to automate testing of an Oracle Jet application. I used firefox's seleniumide to capture a testcase for the login page, but when I run the python ...
0
votes
0answers
10 views

Django: Need for catching unwanted exceptions?

Actually, I was a developer and also doing the white box testing of Django view functions. I have already done a lot of application, my way of testing was I will write test cases for all possible ...
-1
votes
3answers
1k views

How to Iterate and loop the select Options in dropdown box using Selenium with python?

I want to select an apple and then after "save and Go" then after it should select an orange like the way it should iterate till coconut, at end of the list it should be select 'Save & Hold'. I ...
0
votes
0answers
51 views

How to upload a profile pic using python selenium in ubuntu

i am trying to upload a profile picture ,but i am not getting how to do it . I have written a code like this (Sorry i cant share the entire code here i am only sharing a part of code used to upload a ...
0
votes
1answer
716 views

How can I access the http headers using python and selenium?

I have a complex javascript-intensive application I wish for which I wish to use python and selenium for automated testing. However, at the same time I need to have access to the http headers for ...
-2
votes
2answers
128 views

How to Handle checkboxes in Selenium with Python?

There are 7 unselected check-boxes available in application. How to select first and last checkboxes and how to select all checkboxes from reverse order using python selenium webdriver?
0
votes
1answer
442 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
2answers
96 views

Selenium screenshots not visible in Robot Framework HTML log file when executing with pabot

I'm having trouble with Selenium screenshots when using pabot to run my tests. They're simply not visible in the HTML log file as seen in the example below (only a dot is appearing) : The HTML log ...
1
vote
1answer
121 views

Selenium Python Bindings - Accessing Submenu Items

I am using Selenium to write unit tests for a website to test scientific software. The backend uses Flask to generate a sidebar where each project is clickable with a dropdown menu. You can only open ...
0
votes
1answer
824 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 ...
-1
votes
2answers
485 views

How can I copy and paste part of a split URL using Selenium and Python

I have split URL, and I need to copy and paste a part of that split URL. It gives me an error when I use send_keys method: url_parts[4].send_keys(Keys.CONTROL, 'c') AttributeError: 'str' object has ...
1
vote
3answers
1k views

How to find the last element in a list of the same images on a website using python and selenium?

How do i find the last element in dynamic list with images that all have the same id is there a function that i can use like driver.find_element_by_id('editwebsite').last() in python, I want to ...
0
votes
2answers
119 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(...
1
vote
2answers
142 views

Advantage of python unit test in selenium

Hi I started building up automation suite using selenium with python. As most tutorial used python unit test framework. I have 5 scenarios of testing login page. Next 50 or more test are going to be ...
0
votes
1answer
50 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
vote
1answer
139 views

Running python selenium test as suite

I have a simple test suite defined as below from unittest import TestLoader, TestSuite, TextTestRunner from TestScripts.LogOn import test_1 from TestScripts.FirstLog import test_2 if __name__ == "...
0
votes
2answers
276 views

Not able to locate the web element with partial xpath and text [duplicate]

I have web element set like below .. <div class="dxnb-headerCollapsed" id="ctl00_LeftPanel_LeftNavigationMenu_nbMenu_GHC1"> <i class="fa fa-handshake-o fa-2x fa-fw" style="">&...
0
votes
2answers
480 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 ...