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
1answer
10 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
0answers
15 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
26 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
37 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
21 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
19 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
32 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
30 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
41 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
25 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
25 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
26 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
41 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
104 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
18 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
26 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
69 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
47 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
31 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
46 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
57 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
43 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
32 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
119 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
60 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
26 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
152 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
votes
2answers
74 views

How to add elements in list from a dropdown using Selenium/Python

I want to add all the city names in a list, so that I can compare then in assert is not in unit test.
1
vote
0answers
47 views

Sort rows in a dragable table by order selenium python

I have a html Link to html http://threedonthemap.s3-website.ap-south-1.amazonaws.com/ <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name=...
3
votes
2answers
81 views

Struggling with Selenium in python 'is not clickable at point (x, y)' exceptions during testing

There is a website I'm testing on that puts up a gray loading div when the site is processing. The problem is that the div is there immediately at the website load and the only way you can tell it's ...
1
vote
0answers
100 views

Is there a way in PyTest to pass command line arguments to conftest.py directly?

I know that there is a way to pass args in tests itself like it was shown here, but is there a way to pass in conftest.py directly? I want to configure some common stuff for all tests this way.
0
votes
1answer
49 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-...
0
votes
0answers
30 views

How do I click buttons on App which is installed on machine but not a Windows application. It opens a chrome instance (not default Chrome browser)

How do I navigate and click buttons on an already open Chrome instance/window. So the scenario is, that an application named "ApplicationNAME" is installed on my Windows machine, but its not a Windows ...
0
votes
1answer
91 views

How to read Text in a Tradingview Alert with Python and Selenium

After a very useful help here to login on trading view, i cannot figure out how to access to the text of this following alert and close it selecting OK here is the html code corresponding to that pop ...
0
votes
2answers
27 views

detect new element in html using selenium, python

is it possible to detect in selenium, that new dynamic element added in html msg_box = driver.find_element_by_class_name('_3u328') msg_box.send_keys('---') button = driver....
1
vote
1answer
453 views

Headless Chrome browser won't switch to next window (Selenium + Python)

So I have a test case: When clicking a button a new window is opened. To switch to that new window I use: window_after = self.driver.window_handles[1] self.driver.switch_to.window(window_after) When ...
-1
votes
1answer
101 views

Getting key and respective value in ng-repeat using Selenium and Python

Being new to Selenium, I have been trying to figure how to extract the value corresponding to the key under the ng-repeat, in my case, the key is 'status'. The partial page is as follow: <div ng-...
-1
votes
1answer
66 views

selecting date using selenium and python

I am automating the MakeMyTrip application for selecting a respective departure date. suppose I want to select 20 January 2020 how do I select driver.find_element_by_id("departure").click() ...
0
votes
1answer
31 views

how to fetch the list of values from radio button?

I am working on selenium and python. I am unable to select the radio button. I want to add the values in a list. and iterate and click on the specific radio button. def test_search_in_python_org(...
-1
votes
2answers
31 views

How to select from address using selenium and python?

I am automating make my trip app for practicing. I am working on selenium and python I am unable to enter from the address and select the autocomplete list. here is the code import unittest from ...
0
votes
0answers
22 views

Selecting from Dduble drop-down menu with slenium python

I am new to python and I am trying to select from a "cascading" drop-down menu. first, you select the state in the website, and then it gives you a list of municipalities to choose from. Each state ...
0
votes
1answer
77 views

Python Selenium - How to give 100 comma separated list values to selenium send keys?

sheet1 = client.open_by_url("https://docs.googlesheet")-- using google sheet here sh = sheet1.worksheet("Sheet1") dera = gd.get_as_dataframe(sh1,evaluate_formulas = True,skiprows = 0,has_header = ...
0
votes
0answers
86 views

Problem with parallel testing (POM, python, selenium, pytest)

I have a dir named PageObjects, there is a file Login.py. It stocks all the locators of elements plus functions that I call in test cases. It looks like this: class Login: # Locators of all ...
-1
votes
1answer
45 views

How to convert string returning from get text() to tuple? [closed]

My tests are comparing two values to make sure value getting from locator should not be less or equal to expected value. Expected value returning from element.getText method is (0.00, 0.00) and ...
3
votes
2answers
83 views

How to add assertion for blank value?

Scenario: On clicking reset button value should disappear and the field that holds the value should reset to blank. Approach: My approach is to get text or innerHtml from id =mapPropertyHighlighted ...
-1
votes
2answers
158 views

How to select a value from dropdown developed using div tag using Selenium and Python?

In Selenium Java we are using ACTION class method or SELECT method to select value from drop down. Is there a similar method in Python?
1
vote
1answer
61 views

Problem with dropdown (Selenium + Python)

URL = https://www.sephora.com/search?keyword=shaving At the bottom of the page, I'm trying to change from "View 60" to "View All". The problem is that test case passed successfully, but the browser ...
0
votes
0answers
44 views

How do I deal with a Gmail CAPTCHA during automation? [duplicate]

My test suite involves me logging into a website with 4 specified social logins: - MS Live - Facebook - LinkedIn - Google Now the problem is that many of these social logins sometimes give me a ...
-1
votes
2answers
53 views

How can I create a function of login test case in selenium web driver- python & how I can call it in other test case?

How I can create a function of the login test case in selenium web driver- python and how I can call it in other test cases? basically I want to call my login test case in other test cases.

1
2 3 4 5
8