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
0answers
12 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
25 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
58 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) ...
-1
votes
0answers
88 views

Python + Selenium Zen Desk Help test automation

Details: We currently use Zen Desk Help in our Magento project and it is integrated on several pages. I'd like to test it via Selenium, but I get an error message that Selenium is not able to ...
0
votes
1answer
26 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
25 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
40 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
40 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
29 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
28 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 ...
0
votes
1answer
37 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
59 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
81 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
49 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
37 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
49 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
28 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
47 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
28 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
66 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
24 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
333 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
68 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
48 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
30 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
29 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
20 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
57 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
84 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
41 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
124 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
60 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
42 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
41 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.
0
votes
1answer
87 views

Selenium not allowing to choose from dynamic drop down list values

I'm using Firefox and Selenium with Python 3.7. What I'm try to do is: from the Yahoo Finance page search for IBM in the search box and go to that page and select "chart." This brings up the chart ...
0
votes
0answers
37 views

Selenium - Question about how to traverse and select/copy specific texts

In this example, I would like to find all span class of "server-error". I think I am able to do that and store in an array. But here is where it gets tricky for me... Is there a way of appending the ...
1
vote
0answers
39 views

Issue with switching to the new window in Selenium + Python (chromedriver)

I'm having an issue when I try to switch the new opened window. Every time I execute a test case, my chromedriver opens with a window named "data:,". My code: def test_case(self): reg = Register(...
0
votes
1answer
487 views

How to Allow notification permission for desktop-notifications in Chrome Browser using python scripting

Hi i have been trying to automate a page using Selenium Python. And in one of the page it requires the user to grant permission for mic & cam. I have written the code for the same using the ...
1
vote
1answer
127 views

Selenium WebDriver document.getElementById instead of send_keys

I have the following code driver.find_element_by_id("Element_ID").send_keys(str(sheet.cell(row=r, column=2).value)) Values is taken from excel, but instead send_keys, I want to use document....
4
votes
2answers
3k views

Using Python Selenium Not able to perform click operation

I am automating for the following page on CHROME Browser https://study.yupl.us/studies/5d5a64aa8b5bb92fb776753b?auth=false Here I'm able to identify the unique element from the console for the XPATH ...
-1
votes
1answer
55 views

Turning off captcha in selenium [duplicate]

i want to get rid of filling a query form on daily basis and want to automate it. But it is having captcha and i want to turn off captcha so that i can automate form using selenium webdriver using ...
-1
votes
1answer
15 views

The navigator does not take the url that I indicate to him using Selenium on Python

everyone. First, excuse me for my bad English. I will try to go a specific URL but just the browser its open. This is my code 1 file: from selenium import webdriver class Objects: def __init__(...
1
vote
1answer
341 views

I need my selenium webdriver to wait a bit more, but don't want to add an explicit wait

I'm trying to send keys to an input box that is displayed within a dialog. The problem is that sometimes I get only the last few letters of my text, because the send_keys is sending them too fast. I'...
1
vote
0answers
41 views

Issue with parallel testing in pytest

So I have two test cases in a map. From command prompt I type "pytest -n 2" then hit Enter. Instead of opening two browsers and execute them in parallel, pytest is opening 4 browsers, but only two of ...
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
2answers
297 views

Robotframework installation - keyword not found error

I have set up robotframework on my machine and I have installed all necessary plugin and using Pycharm as IDE. But I am getting keyword not found error and also SeleniumLibrary library which I have ...
-1
votes
1answer
46 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
94 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 2 3 4 5 8