Questions tagged [selenium-webdriver-python]
73 questions
1
vote
2 answers
Send keys to active element in Selenium Python
So I have following element that I need to send keys to:

DZR
- 195
- 1
- 2
- 12
1
vote
1 answer
How to load this dynamic website with Selenium
Trying to load this dynamic website but failed. Anyone can help?
driver = webdriver.Chrome()
driver.get('https://apply.95559.com.cn/personbank/portals/ptQuotaQryCoins.do')

user16170843
- 11
- 3
1
vote
1 answer
InvalidSelectorException: Message: invalid selector: An invalid or illegal selector was specified finding a href using CSSSelector and Selenium Python
I'm trying to get the property "href" i.e. "/kkanagas/status/1491996075573587994" from inside the < article > < /article >. I know it's long but I couldn't find another way to shortcut it. Just search for "href" and you'll see…

Cassano
- 253
- 5
- 36
1
vote
0 answers
How can I use the tor browser via selenium?
Hello can you tell me how to use the tor browser via selenium so far I have only found this:
from tbselenium.tbdriver import TorBrowserDriver
with TorBrowserDriver('C:\Users\Brotb\Downloads\win (1)\vendor\tor-bundle') as driver:
…

Kjell Köcher
- 11
- 1
1
vote
0 answers
Selenium + Firefox headless: larger window heights not set correctly
I need to capture a screenshot of a page with a mobile viewport width. The window height needs to be ~18000px to include all the content on the page without scrolling.
Every time I call set_window_size(), get_window_size() reports a smaller height…

kontextify
- 478
- 5
- 16
1
vote
1 answer
Take screenshot with selenium and python
I try to make a script who can scrape Instagram.
For the moment I just open and log into insta with my script.
I would like to take a screenshot but my script close when he have to take the script and I don't have a JPG image inside my folder
This…

Incognito UTF-8
- 25
- 5
1
vote
1 answer
DeprecationWarning: find_elements_by_* commands are deprecated. Please use find_elements() instead using Selenium in Google Colab
There are a few functions that work with selenium and these functions have certain outputs, but when I open them in google colab, I get a few outputs that I don't want, it reduces the…

Emre Oz
- 71
- 1
- 8
1
vote
1 answer
Python Selenium Google click "I agree" button
I am trying to get some data from Google but it I get the "before you continue" google popup. I am trying to make selenium locate the button and click it and return to the getting data but it seems even if I have the button ID in the code it doesn't…

Christian Stoyanov
- 13
- 4
1
vote
1 answer
Python PhantomJS using Selenium
Hello I want try load website with PhantomJS
from selenium import webdriver
driver = webdriver.PhantomJS(executable_path="/Users/martinzuffa/phantomjs-2.5.0-beta-macos/bin/phantomjs")
driver.get("www.google.com")
print(driver.page_source)
Here is…

Martin žuffa
- 21
- 1
- 5
1
vote
0 answers
Selenium python to change the cookies of another site from one site
I want to change a cookie outside the site I'm visiting with python selenium like this (this is my chrome tab not selenium browser)
The site I entered: https://2captcha.com/tr/demo/hcaptcha?difficulty=difficult
Cookie site I use from…

Emrovsky Emrovsky
- 21
- 1
- 8
1
vote
1 answer
Import browser cookies in JSON format using python
I've been trying to get selenium to import JSON cookies to a website (from a file: "cookie.json") but I don't really know how to go about doing that. Most I've tried so far is "driver.add_cookie(cookie1)" with the variable leading to the cookie file…

Anthony
- 33
- 1
- 9
1
vote
1 answer
how to automatically switch pages using selenium?
I'm trying to automatically click on each page, but I get the following error::
endPage=5
for page in range(1, endPage):
print("Page: ", page)
wait.until(EC.visibility_of_element_located((By.XPATH,…

donald.sys
- 301
- 2
- 14
1
vote
1 answer
Python Selenium StaleElement Exception
I am looking for a solution to the StaleElementReferenceException that arises when navigating back to a previous page with Selenium.
Here is a sample code to reproduce the error:
from selenium.webdriver import Chrome
from selenium.common.exceptions…

vianmixt
- 703
- 1
- 6
- 17
1
vote
1 answer
ElementClickInterceptedException in Selenium when the element is only partially obscured
I'm using Selenium for testing. I want to click on an element. The element is very much clickable and visible, but it happens that the middle point of the element is obscured, causing the error.
Here is a MCVE:
HTML code (link to demo):