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
23 views

Python twitch login [closed]

Im trying to make a program that logs into twitch automatically using python and selenium but i cant figure out how to make it click the "login button" at https://www.twitch.tv/ any ...
0
votes
1answer
37 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&...
0
votes
1answer
23 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
60 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 ...
1
vote
0answers
31 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
14 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
17 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
45 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/...
-1
votes
1answer
31 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
1answer
71 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
75 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
43 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
57 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 ...
0
votes
1answer
31 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
87 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
19 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
33 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
69 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
35 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
61 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
49 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
184 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
97 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
76 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 ...
0
votes
2answers
94 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
61 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
215 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
90 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
0answers
23 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
41 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
74 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
363 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
169 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 ...
0
votes
1answer
99 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
17 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
70 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
70 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
38 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
54 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
167 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
192 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
136 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
2answers
39 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
35 views

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

Can not upload a 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
787 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
31 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
55 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
23 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
91 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
17 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() #...

1
2 3 4 5
9