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
153 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 ...
0
votes
1answer
179 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 ...
0
votes
1answer
71 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
10k 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
2k 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
1answer
32 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
1answer
188 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
1answer
1k 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
57 views

Seeking Python test frameworks that support structured test results that include “non failure” data

I am having a hard time finding any test frameworks or plugins for frameworks that support saving "validation data strings" as part of the test results. I find this a little surprising so I am hoping ...
0
votes
1answer
454 views

Automation Testing the python code for Autonomous Driving Environment?

I am newbie to testing world. I am currently working on automation testing for a python code in the environment of Autonomous Car Company, is Robot Framework suitable for that? else which is the best ...
0
votes
1answer
956 views

Python/Selenium automation email question

I am completely new to development and automation so I've been playing around with Python and Selenium to fill out simple forms. The form I am using will detect existing email addresses in a Database ...
0
votes
1answer
3k views

How to save a file by clicking on a link in python-internet explorer-windows [duplicate]

I am having a problem downloading a file using selenium. I had to use selenium to hover over some menus and finally got to the last link which I need to click and reveal 30 zipped files that have a ...
0
votes
1answer
767 views

Turn on print, stderr, or stdout by tag during test run in Behave Python

So I am trying to implement an @warn tag. The idea is this test doesn't make an assertion and fail, but instead simply prints out a warning. I see this answer here, but that only explains how to do it ...
0
votes
1answer
543 views

Selenium python test hung up on url in cronjob

My automated tests get hung up on the .get(url) command randomly. I run several test suites everyday against 60+ different urls (each suite) and a handful will fail to get the url after initializing ...
0
votes
2answers
1k views

Building test cases to check text strings in multiple languages in Webdriver / Python

My group usually doesn't handle web testing, but for this project some of it falls on me and I'm working out automation as I go. The site isn't public, or I'd just provide it for reference. Using ...
0
votes
2answers
370 views

Need To Copy Source Code of CMS Page in Python Webdriver

I am new to selenium 2.53.6 and Chrome webdriver so I may have overlooked something very simple. I need to copy the source code of a CMS page in Python 3.3.6 webdriver. I have tried page_source ...
0
votes
2answers
2k views

Assert multiple Id's using for loop in selenium and python

I want to assert all ids in the list with for loop, my code is not working: list = ["'block-views-news_of_the_day-block_1'", "'views_slideshow_singleframe_main_carousal_new_block-block_1-2'", ...
0
votes
2answers
773 views

No redirection after clicking on <div>

I am trying to automate clicking on a button of a webpage where the source code has the following structure: <div id="ctl02_" class="sel"> <div id="Lo" class="cont"> <...
0
votes
2answers
2k views

Want to click on last button in row in python selenium

I need to click on the last button (CurrentPageUp) in a row. xPath does not work since nr of buttons change frequently. I tried find_element_by_xpath('//*[@id="ShowProducts_PagesTop"]/span/button[...
0
votes
2answers
1k views

How to send keys in an Ajax dropdown?

I already got the Xpath, but when I'm trying send keys there is error : Error Traceback (most recent call last): File "C:\Users\Admin\PycharmProjects\Belajar1\Register.py", line 23, in ...
0
votes
1answer
2k views

Python+Selenium: Continue script execution by ignoring timeout error

How can I get this line elem = WebDriverWait(driver,10).until(EC.visibility_of_element_located((By.CSS_SELECTOR,lastTweetCss))) to move on further in the code if it doesn't find anything after ...
0
votes
2answers
4k views

Selecting multiple options and deselecting options using Selenium with python

I am trying to open a webpage and select options before submitting the form. The issue I am having is being able to selecting more than one option in the select box. Eventually I want to be able to ...
0
votes
1answer
1k views

Question about 'self.assertIn' & 'driver.title'

I researched this as much as I could on my own but came to no clear conclusion to my question. I've been teaching myself automation testing via Python + Selenium, I'm as new or n00b as it gets so bare ...
0
votes
1answer
964 views

Upload image via ajax form with selenium and Python

I'm trying to get familiar with selenium. I decided to try to work with facebook, and fulfill my profile with selenium, But they use too much Ajax. It's not very complicated to fulfill my hometown ...
0
votes
2answers
13k views

How to get the last value in a list/string using Python [closed]

I am a beginner in writing Python scripts and I need help on the following: Threads::num,47141,47146,47151,47156,47161,47166,47171,47176 How can I get and display the last value '47176' The ...
0
votes
0answers
7 views

Using loop how to get dataframe from each next pages and store table values using Selenium Python

https://seffaflik.epias.com.tr/transparency/tuketim/gerceklesen-tuketim/gercek-zamanli-tuketim.xhtml from the above website, I've achieved to enter date picker for two date range and then clicking &...
0
votes
0answers
16 views

Using sendkeys multiple times to scroll down

I am trying to scroll down a drop-down menu, but since scrolling with a mouse will just scroll the page instead of the drop-down, I thought of using sendkeys by sending DOWN_ARROW multiple times. ...
0
votes
0answers
48 views

Selenium drop down menu can't locate 11th element

Trying to scrape data from https://www.sgx.com/research-education/securities and the code below works but only for the first 10 iterations after which it throws a NoSuchElement Exception. Starting ...
0
votes
1answer
18 views

Can Robot Framework framework iterate over example data?

The BDD sample below is written using Katalon Studio Scenario Outline: Verify Price of <plan> Plan Given <accountType> account is currently logged in When User navigates to Publish ...
0
votes
1answer
23 views

Get most recent downloaded file using python-Selenium

My Python-Selenium script is downloading the particular file but the file is taking long time to start and get completed downloaded. It starts after clicking in 25/30 seconds and completed in 50/55/60 ...
0
votes
0answers
28 views

Selenium with ChromeDriver not saving login cookies

In the test that I'm running using Selenium on Python, I simply create a new driver instance like so: options.add_argument("user-data-dir=cookies") # enables cookies ...
0
votes
1answer
24 views

Find childs of element without sub-childs - Python - Selenium

I'm trying to create a bot. The functionality I need now is to find a way to get only childs of an element without sub-childs. Take this as example: <Body> <child1>Hi</child1> ...
0
votes
0answers
15 views

Writing software test which simulates an FPGA device which integrates signals: confused with acceptable error criteria

I'm working on writing a regression test for a hardware device (based on FPGA) used for integrating signals. The goal of the test is to verify the integrator, and I can interface with the device ...
0
votes
1answer
22 views

Not able to get all values from a table with selenium chrome webdriver using python [duplicate]

I want to know the way to collect all the information from a table from a web page. At the moment I am able to get only the records which are visible in UI. (18 rows). However there are 96 rows in ...
0
votes
0answers
35 views

getting error :: 'TestLogin' object has no attribute 'driver'

Below is code of my framework for testing which I am building, but I am getting the error 'TestLogin' object has no attribute 'driver'. Confest.py code: import pytest from selenium import webdriver ...
0
votes
1answer
29 views

How can i get an xpath or any other element for these drop downs, ? Select options or the (Sendkeys) works

How can I get an XPath or any other element for these dropdowns? Now for the first drop down with the value= 'Adrian Clarke,' I was able to get the Xpath and run it successfully. For the second drop-...
0
votes
1answer
23 views

Rrror on running selenium python script - self._execute(self._execute(Command.SEND_KEYS_TO_ELEMENT,)

I am using selenium with python and I try to click on element below. But every time shows the error (in starting was working) only getting error on this line and have tried CSS selector id and all ...
0
votes
1answer
19 views

Jenkins Headless Chrome Causes Staleness Errors

After about a month of creating and ironing out my Selenium automated tests, I finally added it to a Jenkins pipeline. I didn't expect it to succeed on the first try, but I didn't expect to get errors ...
0
votes
0answers
9 views

how to pass 3 variable to threadpoolexecutor “map”

this code will show the issue with map func as the 3 args to login function very important import requests import random import concurrent.futures data = open("data.txt","r").read().splitlines() #...
0
votes
1answer
60 views

Importing test library 'AutoIt' failed: ModuleNotFoundError: No module named 'AutoIt' Error

I am trying to file upload in modal form using robot/eclipse but its not working. I added autoit library to red.xml. Giving below error . Below is my code for file upload Click Element xpath=//*[@...
0
votes
0answers
23 views

Python - Selenium Webdriver and reCAPTCHA [duplicate]

I am developing a login validator in Python 3 using selenium webdriver. I have a CSV with 10 username and passwords that the program will validate. Now, the website on which I have to validate is ...
0
votes
1answer
69 views

Dropdown value disappears when I move to next dropdown

I am trying to scrape some data using the following code. When I run the code line by line, it works fine. However, when I want to run all code at one go, the dropdown options go blank and as a result,...
0
votes
1answer
80 views

Python Selenium to click element in table that another element is present

I am trying to create a scrapper that enters a website and downloads an XML file containing a balance sheet from real estate funds. With the code below, I enter a website for a specific fund with ...
0
votes
1answer
43 views

Is there any possibility of semi-automated text execution in selenium? [duplicate]

Can one semi-automate the test execution, say there are certain things that we can`t do using selenium like captcha issue, so is it possible to start the script, perform some task manually and ...
0
votes
1answer
58 views

Launching Twitter through Appium on a real device results in an error

I've just started using Appium with Python and I'm running into trouble when trying to launch the Twitter app. I have tried to launch the play store by typing: adb shell "dumpsys window windows | ...
0
votes
0answers
35 views

How to Access span element and change it's value

I am trying to create a python + selenium script in order to fetch CSV from a salesforce pardot page. Can Somebody please help me in accessing the nested span element inside the dropdown list which ...
0
votes
2answers
71 views

How to open two separate tabs in same google chrome window using webdriver and python? [duplicate]

I need to test interacting with two tabs in Chrome. I've written a test in Python using Webdriver where I open Chrome with one tab. I need to open a second tab (similarly to using Ctrl+t) so I can ...
0
votes
1answer
737 views

InvalidArgumentException: Message: invalid argument: 'using' must be a string

I'm very new to python, trying to create reusable code. when I try to call the class Login and function login_user in test_main.py by passing all the arguments that were used under Login class, I'm ...
0
votes
0answers
23 views

Failing to update a date using python and selenium

I am trying to change a date one day forward on a calendar date picker using python and selenium. <td colspan="2" class="textBlack">&nbsp;Due:&nbsp; ...
0
votes
1answer
51 views

Trying to use xpath in order to select a text on desktop web browser [duplicate]

This is the error I am getting below: selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="select-input-...

1
5 6
7
8 9