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

help am getting this error message when i install python [closed]

ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.8' Consider using the --user option or check the permissions.
-1
votes
1answer
16 views

cannot click on link Python Selenium

I am trying to add a confirmation link on selenium but selenium is not able to click on that link its on yopmail with name janemartin90452 It doesn't click on the confirmation link Name "Activate ...
0
votes
3answers
29 views

how to get span based on the <p> found

How do i find the element Jessica based on 3000 using xpath. I'm getting ...not a valid xpath error. Jessica Total Wealth ($): 3000 <div> <span><b>Jessica</b></...
0
votes
1answer
31 views

selenium select checkboxes between checkboxes : Python

This is the how my HTML looks like: <tr> <td class = 'text-bar'> id </td> <td> <input type="checkbox" size = "20" value= 'Yes' id =...
0
votes
0answers
31 views

How can I use a for loop in this code in python

I want to run my code 10 times in 10 new tabs. Kindly help me on how can I use a for loop and open in 10 different tabs. code; import time from selenium import webdriver from selenium.webdriver....
0
votes
0answers
18 views

How can I handle browser alert

I do not understand how to click allow button. import time from selenium import webdriver chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--disable-notifications") ...
0
votes
3answers
43 views

Cant fill out Username and Password field using Selenium

I'm trying to fill out a Username and Password field on a website. The id changes every time, so I cant find the elements by using the id. So I tried by using XPath and class name, but none of them ...
0
votes
0answers
29 views

Is it possible to automate electron applications with RobotFramework Browser library?

I am currently using selenium and python to launch and access elements from an electron application. I've used RobotFramework Browser (rfbrowser) library to automate angular webpages previously and I ...
0
votes
1answer
98 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 <...
0
votes
2answers
71 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> ...
1
vote
0answers
33 views

How do I handle Chrome Autofill using Selenium Python?

I encountered an issue using the chrome autofill option. There is any way to handle the options list? (please see the image) What I've done: Load my Chrome Profile Launch Chrome with my loaded ...
0
votes
1answer
237 views

To click on an element which contains class and title in selenium python

I want to click on an element which contains class and title in selenium python. A webpage contains certain folders with unique name. I want to click on a folder by specifying its name or title. Below ...
1
vote
2answers
100 views

New to automation testing of APIs with Pycharm and Pytest

We are moving all manual testers to automation. I am very familiar with 'concepts' but really need a beginners step into automation for new API Service and endpoints. The developer is coding a new ...
0
votes
1answer
30 views

how to get the values of “term_from” and “term_to” using selenium

How can i get the value of term_from and term_to from this html table.
1
vote
2answers
71 views

Send_keys in selenium doesn't activate the submit button but manual entering does

I'm struggling with a phone number field that I fill using send_keys function in selenium. Actually, the submit button is supposed to be enabled after filling out the phone number, but it doesn't ...
0
votes
2answers
38 views

I have a dynamic xpath which is based on 4 values, if I am using OR condition the xpath looks huge, any other way to handle this?

_OPTION_1 = "Average" _OPTION_2 = "M" _OPTION_3 = "Casual" _OPTION_4 = "D" _WIDTH_VALUE_XPATH = f"//mat-option/span[contains(text(),'{...
-3
votes
1answer
49 views

How can i repeat this script many times [closed]

driver.find_element_by_class_name("submit").click() time.sleep(2.5) driver.find_element_by_xpath("//input[@value='Continue >>']").click() time.sleep(2.5) driver....
0
votes
0answers
18 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 ...
0
votes
0answers
49 views

Python selenium - How to loop to register Mega.nz accounts with mails.json (Protonmail)

Everything is fine, but when the script ends it does not loop with the json information. It stays in the Protonmail mailbox and the script no longer works. Try to make the browser completely close the ...
-2
votes
1answer
24 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 success. Want to acess line 130 Começa a new game It has two class="responsive-lg" and the I Want is the second. I need help to overcame ...
1
vote
1answer
44 views

Selenium closing the brower alone after finishing all the function [closed]

I'm pretty new in programming so I might be an easy question but I don't understand why the browsers opened by Selenium closes at the end of the code : def login(Email, Password): Driver = ...
3
votes
1answer
29 views

How to scroll an element to the center of the screen

driver.get( "http://www.uitestingplayground.com/scrollbars") time.sleep(10) driver.execute_script( "arguments[0].scrollIntoView()", driver.find_element_by_id("...
0
votes
1answer
416 views

how to click on the dropdown list items using selenium python without select tag?

I need to click on the dropdown list of items that are hidden and only the list visible once we click on the particular search box. HTML TAG: <div class="main-search_suggestions suggestions-...
1
vote
3answers
35 views

Print with specific text selenium & python

I have a program with python & selenium. I will print the program like this : end-bubble bubble ok end-bubble bubble high My goals are like this: ok high My idea is to print without the end-...
0
votes
0answers
51 views

Python / Selenium is starting an old script before running new script. Do anybody can solve this issue?

I have a problem with Selenium(Python). Does Somebody know a solution? THE PROBLEM If I run a new Script the browser opens and runs an old script, then closes and opens again, and then runs the new ...
1
vote
2answers
91 views

How to Deal With Changing Elements In XPath?

My Code is: bar = browser.find_element_by_xpath("//*[@id='ember26']/input") But it changes every time I login. I can login with my codes but inside the LinkedIn, search bar XPath changes, ...
0
votes
1answer
27 views

safaridriver can't be enabled

I'm trying to use the safaridriver but every time I try to enable it I get a segmentation fault. I already tried to restart my laptop but the problems stays. admin@Bens-Air ~ % safaridriver --enable ...
1
vote
0answers
60 views

RobotFramework AutoItLibrary.Run test case passing, but no window shown

I have Python 3.7.0, Robot Framework 3.2.2, and AutoItLibrary 1.2.7 installed. I have the following test case to simply run an app I have developed in .NET: *** Settings *** Library ...
0
votes
1answer
50 views

How can I count how many times this selenium script has been run in Python?

for example, I run this script 200 times and now I want to run more time. then I count every time and show me in console import time from selenium import webdriver start_time = time.time() driver = ...
1
vote
1answer
40 views

Is there a way to make Selenium use cookies to autologin?

I don't want to have to make the script log in every time. Is there to stop the web driver opening a "fresh" browser and instead make it open my standard version/load cookies so it auto-logs ...
0
votes
3answers
82 views

How to scrape text from html using Selenium or Beautiful Soup

here is the html <div data-v-026c45df="" class="col text-undefined">$682.0</div> I need the '$682.0'. I have tried : start_aum = driver.find_element_by_class_name('col ...
1
vote
2answers
62 views

How to select an element using text() in Selenium with Python?

I am not able to select "Event" in following code using text(). <a class="atg-p-8" href="https://www.abc.com"> <span class="atg-mr-12">.....
0
votes
1answer
256 views

Can't import AutoItLibrary in RIDE/Robot Framework

I have Python 3.7.0, Robot Framework 3.2.2 and RIDE 1.7.4.2 installed on Windows 10. I want to use the AutoItLibrary with RobotFramework. I have installed it as follows: pip install robotframework-...
1
vote
1answer
40 views

What is the correct way to test classes in Python?

There is a class named State that has several attributes, which I need to write unit tests for. The test will need to have certain actions that change attribute values of the State instance. Expected ...
1
vote
1answer
52 views

How to verify the page load opened in a new tab with a redirection?

I am testing a website that redirects the user to another website for buying stuff. Once I click on the Buy Now button a new browser tab opens and another website is launched displaying the product. ...
-1
votes
3answers
584 views

AttributeError: 'TestOne' object has no attribute 'driver'

When I run my script it gives me this error, CONSOLE ERROR : "C:\Users\LENOVO L540\PycharmProjects\easyNeasypytest\venv\Scripts\python.exe" "C:\Program Files\JetBrains\PyCharm Community ...
0
votes
1answer
161 views

i want to run my selenium python script with appachi jmeter .how we integrate selenium python script in apache jmeter

import time from selenium import webdriver from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.select import Select driver = webdriver.Chrome(...
-2
votes
2answers
89 views

How to structure or architect an automated testing project? [closed]

We are implementing automated testing from scratch and we want to use the Python language. We want to build all the tests, based on Selenium (Acceptance tests), in a project separate from the main one ...
1
vote
1answer
39 views

Did not send values in phone number option

I have problems: first, it did not send keys to the phone number, and the second when I select the value in a dropdown it shows me this error. CONSOLE ERROR: Traceback (most recent call last): File &...
1
vote
1answer
91 views

Unable to locate/no such element python selenium

I am trying to click the place order button. Button code : <button type="button" data-ng-disabled="activeStep.position !== 6" class="primary-button place-order-btn" ...
2
votes
1answer
39 views

Selenium screenplay pattern vs PageObject with `isLoaded`

I'm starting to embrace and utilize the screenplay pattern with selenium testing. It's a new concept for me which has me un-learning old behavior. I've been slowly translating some sample tests ...
0
votes
0answers
29 views

How to choose a result in a dynamic webtable that has the same name and later timing in Selenium Python?

I have been working on a Selenium project in Python where I want to choose the result which has a later timing than the earlier one but have trouble implementing it. What I meant is this, Example if ...
0
votes
2answers
99 views

How to solve AssertionError in Selenium Python?

I am currently working on a project in Selenium in Python and I am getting AssertionError when I put a specific parametrised value 6.00 in the parentheses. Test.py Class Test: def test_voidnewcard(...
0
votes
1answer
364 views

ElementClickInterceptedException:

CONSOLE ERROR : Message: element click intercepted: Element <div class="button" data-target="false" data-id="2">..</div> is not clickable at point (937, 293)....
1
vote
1answer
30 views

How to click pop up window button in selenium with Pyhton

I want to click the "Akkoord" button but I am unable to do that. I already tried different methods but they are not working. Any help will be appreciated. one of the codes I tried. from ...
1
vote
1answer
154 views

Python with selenium: unable to locate element which really exists

I've been trying to fill input: <input id="PASSFIELD1" class="logField" type="password" onkeyup="next(this, event);" maxlength="1" autocomplete=&...
1
vote
3answers
55 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-...
0
votes
1answer
381 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
42 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 ...
0
votes
2answers
64 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....

1
2 3 4 5
10