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
1
vote
3answers
26 views

Selecting an option from a dropdown in website with multiple dropdowns using Python/Selenium

I am attempting to select an option form a dropdown menu using selenium in python but kept getting an error that says "Message: Could not locate element with visible text: Active - Milestone VUL-...
1
vote
1answer
27 views

Selenium chrome + python => listbox how to select a value

I am trying to control page by selenium. I have a problem with listbox. This is how it looks: <span title="" class="k-widget k-dropdown" unselectable="on" role="...
1
vote
0answers
13 views

Drag and Drop file located on the network or c drive into a chrome window that was opened by selenium [closed]

I am going to be very blunt and honest...I have no experience with Selenium and drag and drop. How do i move a file from a specific location on the network or c drive of a local computer to a webpage ...
1
vote
0answers
27 views

How we run selenium script in mobile devices?

I want to run a selenium script on mobile devices. for this purpose, I am using the Browserstack website. now the problem is I have written a script it runs in browser invocation right .but when I run ...
-2
votes
1answer
42 views

i want to write better locator for this element? [closed]

Here are two things first when my cursor goes to this element then the dropdown is shown and then click on the "'Litter-Robot Connect'" I want to write a script in python IMAGE LINK : https:/...
1
vote
2answers
48 views

convert to selnium java for loop code in python selenium [closed]

System.out.println("****************Scrolled down starts****************"); Thread.sleep(2000); for (int i = 0; i < 12; i++) { JavascriptExecutor ja = (JavascriptExecutor) driver; ja....
0
votes
0answers
24 views

How do I get to this 'text' data within a th (Table Header)? Using BeautifulSoup,lxml [closed]

Everytime I try to get a header, it comes back as 'none' but within the html. th doesn't have data at the end of the actual value itself. It only contains within itself a '#text.' How do I get ...
1
vote
3answers
72 views

Is there a way to capture screenshot of an element in appium for python?

I want to capture screenshots by elements in appium similar to the one in selenium. I am using python. Could not find much about this, is there any way to achieve this?
0
votes
0answers
20 views

How to click all link text in web using selenium_Python

I'm newbie in python.Now i'm try to create automatic workflow for download all account bank-statements using selenium-python.I have 4 accounts. Like this: This's my sample code: from selenium import ...
0
votes
1answer
43 views

Python How to find a key in a nested dict [closed]

I am currently automating an application that is available across multiple platforms. We have a common JSON file per page denoting the elements locator as below: { "XYZ": { "default&...
-1
votes
1answer
35 views

Understand How to Click on an a Table Element (URL) Based on a Value in that Same Row Using Selenium

I am automating steps in a browser using Selenium/Python; however, I am stuck with trying to understand how to get Selenium to recognize a text value in a table and click on the URL in the ...
1
vote
1answer
721 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 ...
2
votes
1answer
116 views

Automating a comment delete on FB with Selenium

I am trying to automate deleting my old comments on posts I've made on FB. Im using Selenium with python to achieve this. I am currently having trouble dealing with pressing the hidden buttons (1 &...
0
votes
0answers
16 views

How to select a drop-down menu value with Selenium using Python? [duplicate]

I need to select an element from a drop-down menu. <div class="selectric"> <select> <option value="10">View 10</option> <option value=...
0
votes
0answers
25 views

How to validate toast message in Android using Appium Python?

How to validate toast message in Android using Appium Python? Since pop-up message comes and disappears, what will be the best way to validate them?
1
vote
1answer
51 views

Can't locate element [duplicate]

I am trying to click on the link shown on the attachment but, no matter what I try, webdriver can't find the element. I tried these: elem = driver.find_element_by_xpath("/html/body/div[1]/div/div/...
0
votes
1answer
42 views

Function with the While/Try/Except construction intended to close pop-ups fails

The following piece of Python Selenium code do not work and I would be grateful for helping me to understand why. It is designed to close pop-ups that block access to the account button. The number of ...
0
votes
2answers
230 views

Is there any way to run test cases on different browser at once in robotframework using Ride

*** Settings *** Library SeleniumLibrary *** Variables *** ${url} https://www.youtube.com/ ${browser} chrome *** Test Cases *** Search [Template] Open Browser $...
0
votes
1answer
159 views

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot focus element

I am new automation and I am using selenium with python and got stuck. I am trying to upload the document using sendkeys in selenium but getting this error. Error -selenium.common.exceptions....
1
vote
1answer
257 views

How to use pytest session fixture return value in a test class

I am creating automation framework where in few parameters I have kept in a separate JSON file. I have written the below fixture which would load the data from the JSON file in conftest.py. import ...
0
votes
1answer
99 views

Code coverage tool for Python Web application tested by Java selenium tests

I have Web Application where the source code is in Python. All the regression tests are in Java. I wish to perform Code Coverage for the application. Please suggest a code coverage tool to instrument ...
1
vote
1answer
71 views

Error while launching RIDE

I have installed Robot framework and installed wxPython and then Ride. When I launch it by executing python ride.py, it runs into an error as shown below. I believe it has something to do with the ...
1
vote
2answers
315 views

Find element with BeautifulSoup [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 (...
0
votes
0answers
20 views

How to use setUp in selenium?

I want to use setUp instead of setUpClass in my selenium tests. This code works fine and is able to get the correct host when using setUpClass: @tag('selenium') @override_settings(ALLOWED_HOSTS=['*']) ...
-1
votes
1answer
43 views

Find element in multi layer pages for single website

Hello please I'm quite a selenium newbie and I would need help for my thesis data. I want to scrape this marketplace data https://www.tokopedia.com/search?st=shop&q=dapur but to get the data that ...
1
vote
2answers
609 views

Find button class with Selenium on Python

Please I'm quite a selenium newbie and I really need help to get the data for my thesis. I scrapping the marketplace from this url https://www.tokopedia.com/sunxin I want to get the data from the ...
1
vote
1answer
39 views

Variable in Xpath is not working

#driver.find_element_by_xpath('//div[@id="groups"]/div/div/div/div/div[2]/div[1]/div/div/button').click() i = 5 gPath1 = str("\'//div[@id=\"groups\"]/div/div/div/div/div[2]/...
3
votes
1answer
63 views

Unable to extract table content from webpage using selenium

I am trying to extract the tables generated by selecting "Branches", a city and a district from this site: https://www.acb.com.vn/wps/portal/en/atm So far, I have been able to write the code ...
1
vote
1answer
101 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
1answer
458 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
1answer
216 views

Selenium thinks button is clickable even when disabled

I'm having an issue where Selenium is saying a button is clickable even when it's disabled. I'm using Selenium with a website where you have to select a date first and then time slot from a dropdown ...
0
votes
0answers
78 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 ...
1
vote
3answers
136 views

Why does Google Chrome initiated through Selenium shows less attributes for anchor tags compared to normal Chrome session?

I'm trying to scrape some image href attributes from the <a> tags from a Google search using Selenium, ChromeDriver and Chrome. When the url is accessed manually I'm able to locate the required ...
0
votes
1answer
108 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 ...
-1
votes
1answer
806 views

How to configure path for file download in python-selenium

I have changed the path of file download from using below code. chromeOptions=Options() chromeOptions.add_experimental_option("prefs", {"download.default_directory": r"C:\...
0
votes
1answer
490 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
1answer
59 views

Electron Application toolbar automation using selenium python

Is it possible to automate the tool bar options like File. Edit, View , Window and Help options using Selenium webdriver with python?
0
votes
2answers
52 views

Trouble logging on to a website with selenium web driver

I'm fairly new to developing but I'm having a problem logging into a website. The code I have currently typed in the username, password, and correctly clicks the log in button. However, the page ...
0
votes
0answers
143 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 ...
1
vote
1answer
994 views

Find Text without span Text - Python - Selenium

I want to get text that is stored on an element. Text is not a property instead when I expand Element (in chrome's inspection [DevTools]) it has two sub-properties, span and text. it looks something ...
-1
votes
2answers
348 views

How to get incremental xpath for newly added rows in webtable using robot framework-python-selenium

I came across a certain requirement. There is a web table where new rows are added daily.I want to write an automation script in Robot Framework-Python-Selenium-Eclipse-RedEditor Plugin. Right now, I ...
1
vote
1answer
313 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
18 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
203 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 ...
1
vote
3answers
583 views

How can I get the value from span class in selenium?

In the code above, how would I get the span class value (238.67) to show up? What would I exactly use?
0
votes
0answers
60 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 ...
1
vote
2answers
61 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
521 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
359 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)...
2
votes
1answer
272 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
2 3 4 5
9