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
-2
votes
0answers
29 views

Python BBD - features, scenario, tests are skipped

I've got a problem writing my test. Seems like behave skipping my tests and only running what is inside environment.py (getting webdriver and quiting). My .feature file: Feature: steps Scenario: ...
1
vote
1answer
29 views

Best way to architect test development in Python so that tests can be run either with a mock or without a mock?

I'm starting a fresh python project and I want to write unit and integration tests with mocking and stubbing. However, I would like to run these tests during the build-pipeline against actual services ...
0
votes
1answer
32 views

Problem with Selenium testing with Python [closed]

I am working on automating a website test using Selenium this website is dynamic so i can't use class names/ID's and names checking the HTML code i noticed there was only a class name so i looked into ...
0
votes
1answer
33 views

Element <div class=“gQzdc _3sdhb”> is not reachable by keyboard

I'm trying to scrap WhatsApp using python selenium. I'm trying to find name by locating the search box and typing the name over there. But I'm getting error as Message: Element <div class="gQzdc ...
0
votes
2answers
80 views

How to select values from dynamic drop down using selenium?

My code: from selenium import webdriver driver = webdriver.Chrome(executable_path="D:\\Work\\chromedriver.exe") driver.get("https://www.makemytrip.com/") print(driver.title) print(driver.current_url)...
1
vote
1answer
47 views

How to fetch username and password from excel one by one to test login functionality in robot framework-selenium-python

I am trying to login to my application one by one using different credentials in robot framework-python-selenium but it is not working. Below is my code. Please suggest. Open Browser ${URL} chrome ...
1
vote
1answer
28 views

Is it possible to add specific tests to the collected tests?

I'm using pytest with Appium for mobile testing. I have multiple test cases and scenarios, and all of them must start with the same specific test steps. I don't want to write this steps in all other ...
2
votes
2answers
29 views

Help me please, how to upload file. File-input appended on click, but on click it opens OS native window

Can not upload file. DOM elements: <button type="button" id="button-upload" data-loading-text="Loading..." class="btn btn-primary"><i class="fa fa-upload"></i> Upload</button>...
0
votes
1answer
94 views

failed: ModuleNotFoundError: No module named 'robot.parsing.populators' error

I was using python 3.6 for robot framework and selenium. As my client wants to upgrade to python 3.7.1 we did that. Now facing issue in running my automation scripts with the message as failed: ...
0
votes
1answer
25 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
21 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
17 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 ...
1
vote
1answer
18 views

Rrror on running selenium python script - self._execute(Command.CLICK_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
0answers
8 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
41 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=//*[@...
-1
votes
1answer
18 views

“log in ” website with requests and threading “python”

I want to login to website but using threading and see many tutorial and can't find my situation import requests data = open("data.txt","r").read().splitlines() #loding the username and password ...
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
2answers
66 views

How To Print The Text Of All Elements From List In Selenium Python?

Below is the sample class with its sample code: from webdriver_manager.chrome import ChromeDriverManager from selenium import webdriver from selenium.webdriver.common.by import By class Sample: ...
2
votes
1answer
60 views

Fails with Dictionary has no key even after validating key exists

I have a scenario where I need to do different set of actions depending on dictionary key and value Dictionary can be any of the below &{DICT_VAL_APPLINPUT}= Create Dictionary status=...
0
votes
1answer
61 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,...
1
vote
1answer
12 views

How to select third tab on same class name by selenium python

I just jump into python programming. I couldn't solve this I tried to several ways This is target site <div class="base-components__BaseElement-sc-150tvch-0 sc-VigVT bJRDeW"> <ul role="...
2
votes
1answer
29 views

Selenium + Python: Abort a test after x minutes

Details My test scenarios currently cover over 300 test cases. Everything is written in Python (3.8) and Selenium and all test cases are covered by exceptions. At the moment there is only one ...
0
votes
1answer
47 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
46 views

Extracting all reviews of particular app from Google play store website

import time from selenium import webdriver from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by ...
0
votes
2answers
30 views

How to deal with changing xpath, when the static parts of the class name and id, are the same as the other input fields?

I am stuck at a point where I need to fill out an input form. However the full xpath is dynamic, and the static parts of the element is the exact same as the static parts of another element. So I can'...
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 ...
-2
votes
1answer
24 views

Testcase Python Request: 405 Error despite not accepting the certificates

Details Currently I have the problem that I cannot accept the certificate on our test page. We use Python requests for our test cases and unittest from Python directly. We have also excluded the ...
0
votes
1answer
42 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 ...
1
vote
0answers
34 views

There is a way to identify font type in an Android app? (Python, Appium)

Here is the deal: i'm testing an android app and the client wants us to test font types, sizes and colors. Using Appium's explorer i'm able to see the objects properties (such us: text, enabled, etc) ...
-1
votes
2answers
43 views

Open Source project recommendations to get started with SDET work? [closed]

I just did an online course in Software Testing (Udacity CS258) and I'd like to practice my skills. Can you recommend open source software that's serious about testing, has a great community and ...
0
votes
1answer
41 views

Python + Selenium: Is there a way convert Groovy based test cases into Python?

In my new project, I am supposed to bring the current test cases, all written in Groovy, to a Python base. We are talking about several thousand test cases that have accumulated over the last years. ...
0
votes
1answer
88 views

[Python][Selenium] New tab is opened but Selenium can't detect it

I am working with selenium in python. Currently, I have written a script that opens a new tab from one of the search results of Google. The associated code is as follows: from time import sleep from ...
0
votes
1answer
29 views

How to create a property file in python?

In java we have .property file to have all our locators, how to have and use a same kind of file in python?
0
votes
2answers
65 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
523 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 ...
-4
votes
1answer
46 views

Can Python be used in automation [closed]

I currently do a lot of manual testing of a webpage performing a lot of regression on Telerik. I was wondering if Python can be used as an alternative. I don't mind doing the courses but would be ...
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
2answers
29 views

Search by xpath and text where text is a string contained within a list

I'm struggling to find a way to search a page by xpath that contains text that I've defined within a list using selenium. If I replace Role_List[y] by "WK" etc., it works fine and I can repeat it 4 ...
3
votes
3answers
79 views

Google Chrome browser and driver versioning

I have a CI pipeline that runs my E2E tests, which the agent is prepared by: Install Google Chrome by brew (latest) Chromedriver is installed by chromedriver_binary python package (fixed version) ...
0
votes
1answer
206 views

Cannot locate element during the second iteration in the loop selenium python

The goal is to add each product to the cart one by one. I have an error on the second iteration. selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable ...
1
vote
0answers
34 views

Could I improve my code by opening multiple tabs?

I'm trying to scrape information from an array of links using selenium. Each of them take ~2 seconds to scrape, and it adds up to quite a while. Is it possible / worth trying to open the links in ...
0
votes
1answer
52 views

No Such Element (Selenium) [duplicate]

I have checked far and wide for a fix for this. But to no avail. Nothing seems to work. I am trying to locate a Username and Password box to enter in the information. But it comes up with the error ...
3
votes
1answer
97 views

python code for asking microphone permission in Chrome and other Browser?

I am developing an application where I need microphone access. So, anyone can tell me the python code for asking microphone permission in Chrome or any other Browser.
1
vote
1answer
154 views

When i send string with send_keys() its taking substring in chrome driver (selenium python)

Hi all i'am facing problem with selenium (i'am using python) for chrome driver, when i send some string with .sendkeys( ) some time its taking first two characters and some time its taking first ...
0
votes
2answers
46 views

“chrome.window.onRemoved.addListener()” does not executes when webdriver.quit() is executed in Selenium with Python

I want to perform logic on chrome.window.onRemoved.addListener(), it works exactly in chrome browser development environment and in selenium when performed with browser UI of selenium test, but when I ...
2
votes
3answers
160 views

python+selenium+Unittest: get website cookie/manipulate cookie/send back. Possible?

Details: For our test procedures, we want to read the cookies of a website, manipulate the cookie and read it again. We want to test if this is possible at all to avoid a security gap. We use for ...
3
votes
1answer
62 views

Make an if/then statement utilizing a non present element

I'm using Python and I came across one problem. I'm trying to make a bot using selenium, and it's coming along nicely but I'm trying to use a non-present element to activate a function and I just can'...
1
vote
1answer
30 views

How to jump between two different elements located same level?

In the google chrome inspector console enter the xpath: $x("/html/body/div/div/footer/md-toolbar/div/div[2]/img[2]/../../../../../../..//*[@id='input_15']") the console returns the element, ...
0
votes
1answer
414 views

Multi-factor authentication - Selenium automation

My company uses Multi-factor authentication to restrict access to some sites. Is it possible to copy user profile from firefox and use it in my new window?

1
2 3 4 5
9