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
1 answer
351 views

Selenium - cannot click on radio button

I have tried all the possibilities but am unable to click the radio button Yes or No. It would be great if I get some help. I have observed that Need to take this attribute (<span radiogroup class=&...
-2 votes
1 answer
406 views

Selenium Webdriver: HOW TO CLICK IN A BUTTON WITHIN A CLASS OVER OTHER CLASS?

I've been trying to click in a button and haven't succeeded. I want to access line 130 Começa a new game It has two elements with class="responsive-lg" and the one I want is the second. I ...
0 votes
1 answer
786 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-...
2 votes
2 answers
3k views

Find element with BeautifulSoup in python [closed]

I'm still learn to code with python. I really need help to scrape the element from this website: https://www.tokopedia.com/craftdale/crossback-apron-hijau-army?src=topads I want to get Review data (...
4 votes
1 answer
6k views

Selenium: how to prevent a just-started Chrome window from receiving focus

Using Selenium + chromedriver on Linux, like so; chrome_options = Options() driver = webdriver.Chrome('/usr/bin/chromedriver',options=chrome_options) driver.get('https://www.somewebsite.com') Chrome ...
0 votes
2 answers
3k 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
1 answer
11 views

Python + VS Code: ModuleNotFoundError: No module named ' ' occur

Facing issue with error : ModuleNotFoundError: No module named 'selenium' Basically, Error is not specific to module 'selenium'. Facing this issue in VS Code even when, I have selenium installed for ...
1 vote
1 answer
2k 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....
0 votes
1 answer
10 views

macOS Monterey12.0+Python+Selenium+Chrome: WebDriverException: Message: 'chromedriver' executable needs to be in PATH & “chromedriver” can’t be opened

I am facing following multiple issues with Python + Selenium + Chrome : WebDriverException: Message: 'chromedriver' executable needs to be in PATH. “chromedriver” can’t be opened because Apple ...
0 votes
1 answer
28 views

How to get specific data in a div with Selenium?

Let's say this website has frequently changed data (stores). I am also only interested in certain stores from my list. How do I get all the data of the first store from the top and from my list? I was ...
2 votes
4 answers
3k views

Issue using XPath

I'm using Selenium and PyCharm. Website: https://www.expedia.com/ I'm trying to click() on the Search button. I used these: driver.find_element(By.ID, "search-button-hp-package").click() ...
0 votes
1 answer
575 views

AttributeError: module 'selenium.webdriver.common.keys' has no attribute 'RETURN'

When I run my script it gives me this error: Traceback (most recent call last): File "C:\Development\Python_Project\SDETpythonProject\SDET_Package\my_firstProject.py", line 18, in <...
1 vote
1 answer
828 views

Appium, clicks on buttons sometimes has 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. The method I am using: def click_element(self, element, time=wait_time): ...
0 votes
0 answers
14 views

How to get "Related Test Cases" over testlink API?

I'm trying to get the related test case(s) located on the filed "Related" over Testlink API using Python. However I've retrieved all the API method names and none of them showed something ...
0 votes
1 answer
1k views

How to select li element using Selenium in Python

I am trying to automate something on shopify, and depending on what the variable (lets say x) is, I want it to go into that list. For example, if x=2, then from that ul/li(list), how can I make it ...
0 votes
1 answer
55 views

Android Function testing report generate using Appium + Python

I am currently working on a mobile application with appium with python. There are a lot of options for every file selection in that. Currently checking if processing all the types of files are ...
1 vote
2 answers
2k views

To work with two different drop downs which are dependent on each other

I have a scenario, which I am finding bit difficult to automate. The test scenario is : There are two drop down. To select the state. To select the respective cities. So, I need to write a script to ...
0 votes
3 answers
226 views

How to get text of <span> based on the <p>?

How do I find the element with text "Jessica" based on "3000" displaying in the web page using xpath? I'm getting ...not a valid xpath error. <div> <span><b>...
2 votes
2 answers
6k 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("#...
1 vote
1 answer
22 views

Page doesnt change / next

Why the page doesn't change, but also don't receive an error in console. Can someone please help me in this case? driver.find_element_by_link_text("»").click()
0 votes
0 answers
13 views

Working on Notebook but not working on cmd

I am using Selenium to help me collect data from a web page. This page has two dropdowns, which change a list of links to PDFs which I then download. My code runs fine in a notebook but does not work ...
-1 votes
1 answer
25 views

Fixed storage paths for Selenium screenshots or logs possible?

Details: Currently I use Python 3.10 and Selenium. I used here in the area of functional testing here in particular UI Testing accordingly also Selenium screenshots. But since I work on different ...
1 vote
1 answer
3k 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
3 answers
894 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
2 answers
123 views

Strange drop down automation problem - multiple select

I've tried for days to figure this one out. I have a selector that I can't figure out. It seems to be a regular select statement with multiple options but when clicking one option directly it ...
0 votes
1 answer
152 views

Python Dryscrape - how to select child element?

I'm working on a project with www.NJMLS.com. I'm trying to extract email of agent name "Edward An": import dryscrape as d d.start_xvfb() br = d.Session() br.visit('http://www.njmls.com/...
1 vote
1 answer
11k views

How do I enable ChromeDriver to use browser cache or local storage with selenium python

I was trying to automate a website and it's a PWA. I need the caching data for this site as it takes too long to load, once loaded it's pretty fast. But every time I run my scripts chrome starts a new ...
0 votes
2 answers
1k views

Finding sibling of found element using selenium

I've got a field with a date in it that's identified by a code that's shown in the div previous to it. <div class="fcode"> <div class="fcode_n">(123)</div> ...
0 votes
1 answer
510 views

Selenium + Python: how can we close all opened tabs except the first tab/main tab?

This is my code, ''' import time from selenium.webdriver.common.by import By from selenium.webdriver import ActionChains from selenium.webdriver.support import expected_conditions as EC ...
0 votes
3 answers
285 views

Is there a way to record a video of my Selenium automation with Python?

I'd like to have video recordings of the Selenium automation at work. And then delete the recording when the tests pass. This way whenever the tests fail we can quickly replay the video to see what ...
1 vote
1 answer
98 views

Automated tests are failing when ran together but pass when are ran individually

I'm using Python+pytest and Helium to create my tests. Each time I run a test individually, it works 100% of times. However, if I try to run more than 5-6 tests together, some are failing, some are ...
0 votes
1 answer
34 views

How to handle the exact position of runtime creating webelement in selenium python

I've been writing a couple of tests using selenium for my website. However, I've not found a way to test multiselect dropdown with checkboxes that is filled by V-autocomplete(vuetifyjs) component . As ...
-2 votes
1 answer
36 views

Which can be better in automation framework designing for an organisation, Python or Java? [closed]

I want to start automation testing with selenium webdriver(need to design the framework for the same), so which would be better to start with Java or Python ?
2 votes
3 answers
77 views

Are there any good links and references for learning how to create an Appium Python Framework?

Are there any good links and references for learning how to create an Appium Python Framework? There seem to be a lot of Java information out there, but Python seem to have a lot less available ...
1 vote
1 answer
961 views

Selenium Python - Unable to find an element, get stale element exception when using element locator

Scenario: 1.Login to a website using script and navigate to the Home page. 2. On the home page, click a link and navigate to a new page. 3. Then navigate back to the home page using the top navigation ...
0 votes
2 answers
674 views

SyntaxError: invalid syntax // SyntaxError: unexpected EOF while parsing

How do I detect text inside of this, this is HTML & this is XPath. I tried HTML <span class="messageText">Hello.</span> XPath //*[@id="liveAgentChatLogText"]/span[22]/span[2] ...
0 votes
1 answer
159 views

Explicit wait doesn't work with selenium python

I am learning selenum with python and the explicit wait method doesn't work to click on the 'accept cookies' button. Otherwise, the time.sleep method work and I would like to understant why the ...
0 votes
2 answers
378 views

Can't switch control on elements of a chatbot using selenium in python

I am trying to send a message as input to chatbot to check the response but when I am trying to send a message to a chatbot, I need to click on the input box where one can enter a message. But it is ...
0 votes
1 answer
4k 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 ...
1 vote
3 answers
8k views

Python Selenium Find Button

I have a Website were I want to click a button, but I can't find in the button in the HTML script, what I have to write in my Python script? Later I want to have something like driver....
0 votes
1 answer
108 views

What application types are supported by winappdriver

I have application which has extension as .msc, I tried it with python I also ran winappdriver before executing this script. I have seen demo codes on some blogs which uses .exe file extension for the ...
0 votes
0 answers
15 views

Access drop down with class in RobotFramework

I am using RobotFramework. How can I access the drop down with a class? Because I don't have the list name.
0 votes
0 answers
77 views

send_keys() command don't work on python selenium

import time from tkinter.tix import ButtonBox from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from ...
0 votes
1 answer
75 views

Python Selinium Javascript button download file

Website: https://myir.ird.govt.nz/eservices/home/?link=RWTEXREG I'm attempting to download this file. It looks like the request is handled server side so there isn't any download link per se. I've ...
1 vote
3 answers
3k views

Python Selenium unable to login by clicking on Button inside a form

website:https://www.etoro.com/login <button automation-id="login-sts-btn-sign-in" ng-click="loginCtrl.login(loginForm)" class="e-btn-big wide dark pointer">Sign in</button> I am trying ...
0 votes
1 answer
617 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 ...
1 vote
1 answer
3k 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 ...
0 votes
1 answer
475 views

How can I set the language of Safari and launch using Selenium?

I need to launch the Safari browser for automation with a specific language(Korean) for automation purpose. I am using selenium with python for automation. How can I do that ?
1 vote
2 answers
796 views

Selenium is not finding button even though it has a Class Name and XPath

I am attempting to click a save button but Selenium (with Python) is having issues. I keep getting the error, "Message: no such element: Unable to locate element" Here is the HTML <input ...
0 votes
1 answer
148 views

Locate xpath of an element visible only on hover

I am doing automation on the following :- The comments you see(<!---->) , changes when I hover over the INFY(in green on the left) (See one of the comment changes to <span class = "...

1
2 3 4 5
11