google-chrome

read data from chrome console to python

read data from chrome console to python Question: `I have a code in python to read xpath from a website (https://www.op.gg/summoners/kr/Hide%20on%20bush) import requests import lxml.html as html import pandas as pd url_padre = "https://www.op.gg/summoners/br/tercermundista" link_farm = ‘//div[@class="stats"]//div[@class="cs"]’ r = requests.get(url_padre) home=r.content.decode("utf-8") parser=html.fromstring(home) farm=parser.xpath(link_farm) print(farm)` this code print "[]" but when in the console chrome put …

Total answers: 2

Can't run Chromedriver in headless mode using Selenium

Can't run Chromedriver in headless mode using Selenium Question: running my selenium script I ran into an error that I don’t know how to pass. I’ve googled and tried various solutions but they didn’t work. Here is my code: from selenium import webdriver from selenium.webdriver.chrome.options import Options chrome_driver_binary = ‘/home/user/Projects/myproject/chromedriver’ options = Options() options.add_argument("–start-maximized") options.add_argument("–no-sandbox") …

Total answers: 1

Chrome opens website and Immediately Closes when Using Selenium and Python

Chrome opens website and Immediately Closes when Using Selenium and Python Question: Chrome Version : 110.0.5481.104 Chrome Driver Version: 110.0.5481.77 From What I have heard last digits of the version do not matter. Its just a Simple Piece of Code:- from selenium import webdriver import os os.environ[‘PATH’] =r"C:/Users/xxxx/Desktop/xxxx/Selenium/chromedriver_win32/chromedriver.exe" driver=webdriver.Chrome() driver.get("https://phptravels.com/demo/") Chrome Opens up shows the …

Total answers: 1

can't select a checkbox in webdriver.Chrome python

can't select a checkbox in webdriver.Chrome python Question: I’m trying to create a script to show only pikachus on singapore poke map and the rest of the code is to go over the elements and get the coords for it and print the list. I’m trying for a long time many suggestions I’ve seen here …

Total answers: 2

click button in python selenium

click button in python selenium Question: html codemy code how can click buton in this html code im using selenium. I’m trying to writing a loop in my admin panel. Asked By: phantompain || Source Answers: first off that button does not have an id=’button’ without seeing the website you could try do something like: …

Total answers: 1

Chrome log: Nested dictionary in python

Chrome log: Nested dictionary in python Question: I’m figuring out how to access to this nested dictionary(it’s a log from chrome) How Do I access to these keys or at least the ‘method’ and ‘params’ ? I tried message[method] to get ‘Network.responseReceived’ value but it return an error def new_file_log(self): # Chrome log logs = …

Total answers: 2

How to edit my code so google dont detect me when I am headless?

How to edit my code so google dont detect me when I am headless? Question: I have code that work well with selenuim. but when I try to use headless option. It detect me. what way does google detect me. The code used to login to my google account. I tried to add user agents …

Total answers: 1

Selenium Webdriver Xpath id random

Selenium Webdriver Xpath id random Question: I have a problem, when I look for the id of an xpath it changes every time I enter the web how can i use selenium webdriver python browser.find_element(By.ID,) if the id changes every time I consult it first <span data-dojo-attach-point="containerNode,focusNode" class="tabLabel" role="tab" tabindex="0" id="icm_widget_SelectorTabContainer_0_tablist_dcf42e75-1d03-4acd-878c-722cbc8e74ec" name="icm_widget_SelectorTabContainer_0_tablist_dcf42e75-1d03-4acd-878c-722cbc8e74ec" aria-disabled="false" title="" style="user-select: …

Total answers: 2

python how to check if selenium webdriver is minimized

python how to check if selenium webdriver is minimized Question: the problem is i don’t know how to check if browser has minimized, so how to check if browser is minimized on selenium (python)? i have tried this code: driver.get_window_size() but it will return browser size before minimized, and also i have read this question …

Total answers: 1

Selenium chromedriver not running pages js scripts

Selenium chromedriver not running pages js scripts Question: page normally loads like this but when it is open with chrome driver via the selenium in python it loads like this I have looked up how to start js scripts on a page, rocket-loader.min.js is a consistent thing I see in the pages source, but nothing …

Total answers: 1