selenium

Python +Selenium can't find element to send key

被刻印的时光 ゝ 提交于 2021-02-11 13:54:40
问题 I already deal with it for many days having no idea how to solve it... That is the element I want to get by selenium <input name="QUICKSEARCH_STRING" id="QUICKSEARCH_STRING" onfocus="setTimeout('focusSearchElem()', 100);" type="text" value=""> They all pop out the warning like this one ===> Message: no such element: Unable to locate element: {"method":"css selector","selector":"[name="QUICKSEARCH_STRING"]"} (Session info: chrome=79.0.3945.88) It is my code: import selenium.webdriver from

How to use WebDriverWait from Selenium properly through Python?

吃可爱长大的小学妹 提交于 2021-02-11 13:54:02
问题 Just thought I'd add an edit now that this has been resolved. Replacing those 2 time.sleep() took my program from 180 seconds down to 30. WebDriverWait creates a substantial improvement in runtime. Just trying to determine if I'm setting up WebDriverWait correctly. This is my working script, I use time.sleep() for x,sequence in enumerate(table.find_elements_by_xpath('//*[@id="gwzSngrOrderResultPanelRoot"]/table/tbody/tr/td[9]'),1): driver.find_element_by_xpath(f'//*[@id=

Cannot use Private Socks5 proxy with Selenium+Firefox (Python)

你。 提交于 2021-02-11 13:51:53
问题 Context: I am using Python, selenium + Geckodriver. Firefox webbrowser automation and I have problem on a private proxy authentification. I cannot manage to configure my socks5 proxy username and password. Thus, Firefox shows up but connection doesnt work. The simple task that I want to do is : I want to use selenium(automated Firefox) with a proxy (SOCKS5 proxy with password) Checking my IP on a website to see if the proxy is working What I noted so far is: I am using Firefox V76.0.1 ,

Selenium webdriver error Chrome failed to start [duplicate]

情到浓时终转凉″ 提交于 2021-02-11 13:46:33
问题 This question already has answers here : WebDriverException: unknown error: DevToolsActivePort file doesn't exist while trying to initiate Chrome Browser (31 answers) Closed 2 years ago . I am trying to open Chrome webdriver through Selenium and I'm getting an error when initializing it. The error I'm receiving: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "F:\WinPython\python-3.6.7.amd64\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 81, in _

selenium grid parallel execution on the same browser

 ̄綄美尐妖づ 提交于 2021-02-11 13:42:05
问题 I'm using selenium-grid, and want to how to start my tests in parallel on the same browser, for example: Chrome The problem is, Chrome keeps opening only one instance util the first test is finished, and then start the next test. Please help me :) public WebDriver createDriverGrid() throws MalformedURLException { String hubUrl = "http://localhost:4446/wd/hub"; ChromeOptions capabilities = new ChromeOptions(); capabilities.setCapability(CapabilityType.BROWSER_NAME, "chrome"); driver.set(new

Convert Web Page from Swedish to English in Python Selenium

狂风中的少年 提交于 2021-02-11 13:41:14
问题 I am trying to use the below code to convert a web page from Swedish to English language: chrome_options.add_argument("--lang=en-US") I also tried the below: 'profile.default_content_settings.images': 2, 'translate_whitelists': { 'se':'en', 'el':'en', }, 'translate':{'enabled':'True'}, 'intl.accept_languages': 'en,en_US', }) None of them worked. The code has to be in Python Selenium 回答1: Try below code - from selenium import webdriver from selenium.webdriver.chrome.options import Options

open url's having “# ” in them (Selenium webdriver)

有些话、适合烂在心里 提交于 2021-02-11 13:37:01
问题 I have a URL like https://abc.xyz.net/#/abcdef/1-2-3. String url = "https://abc.xyz.net/#/abcdef/1-2-3" When trying to open it using driver.get(url) , its opening only till "https://abc.xyz.net/#/" and the remaining part is not evaluated or getting truncated. Can someone please help me how to resolve it. I am using Java + Selenium WebDriver. 回答1: thanks Prany for your time. The issue is due to the fragment identifier "#" in the url. I am able to resolve it by using JavascriptExecutor. 来源:

Is there something issue in indentation, while using Anaconda's Spyder

随声附和 提交于 2021-02-11 13:36:01
问题 from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC This code snippet pops an error of indentation while running in Anaconda's Spyder. This the below error: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "C:\Users\Panch\AppData\Local\Continuum\anaconda3\lib\site-packages\selenium\webdriver\__init__.py", line 18

WebDriverException Error when using selenium chrome webdriver with options

那年仲夏 提交于 2021-02-11 13:27:37
问题 I would like to run the chrome webdriver on my MAC with my original chrome profile/options, so that i don't need to write a script to log in to the page in the temporary opened automated driver. my original code without options was run successfully DRIVER = 'chromedriver' driver = webdriver.Chrome(DRIVER) However, when I try to use options I get the following error, and here is my code from selenium import webdriver from selenium.webdriver.chrome.options import Options options = webdriver

WebDriverException Error when using selenium chrome webdriver with options

送分小仙女□ 提交于 2021-02-11 13:27:26
问题 I would like to run the chrome webdriver on my MAC with my original chrome profile/options, so that i don't need to write a script to log in to the page in the temporary opened automated driver. my original code without options was run successfully DRIVER = 'chromedriver' driver = webdriver.Chrome(DRIVER) However, when I try to use options I get the following error, and here is my code from selenium import webdriver from selenium.webdriver.chrome.options import Options options = webdriver