selenium-webdriver

WebElement.getText() function and utf8

允我心安 提交于 2021-01-03 06:20:13
问题 May i assume that for every web page the WebElement.getText() function does return utf8 Strings, or can it have other encodings? If there could be other encodings, how can i identify it and convert it to utf8? 回答1: I don't know no one good way(maybe if you like reflection, you can hack and rewrite) to do getText() return needed encoding. But in this Selenium web driver and multillanguage I wrote some way to encode String. 回答2: I don't think so. According to the API, getText() returns a String

WebElement.getText() function and utf8

安稳与你 提交于 2021-01-03 06:18:40
问题 May i assume that for every web page the WebElement.getText() function does return utf8 Strings, or can it have other encodings? If there could be other encodings, how can i identify it and convert it to utf8? 回答1: I don't know no one good way(maybe if you like reflection, you can hack and rewrite) to do getText() return needed encoding. But in this Selenium web driver and multillanguage I wrote some way to encode String. 回答2: I don't think so. According to the API, getText() returns a String

How to use existing login token for telegram web using selenium webdriver

荒凉一梦 提交于 2021-01-01 07:12:37
问题 I'm trying to read telegram messages from https://web.telegram.org with selenium. When i open https://web.telegram.org in firefox i'm already logged in, but when opening the same page from selenium webdriver(firefox) i get the login page. I saw that telegram web is not using cookies for the auth but rather saves values in local storage. I can access the local storage with selenium and have keys there such as: "dc2_auth_key", "dc2_server_salt", "dc4_auth_key", ... but I'm not sure what to do

How to use existing login token for telegram web using selenium webdriver

独自空忆成欢 提交于 2021-01-01 07:12:33
问题 I'm trying to read telegram messages from https://web.telegram.org with selenium. When i open https://web.telegram.org in firefox i'm already logged in, but when opening the same page from selenium webdriver(firefox) i get the login page. I saw that telegram web is not using cookies for the auth but rather saves values in local storage. I can access the local storage with selenium and have keys there such as: "dc2_auth_key", "dc2_server_salt", "dc4_auth_key", ... but I'm not sure what to do

Selenium Python test batch file does not run in Task Scheduler, browser does not open. Batch file does run ok without task scheduler

余生颓废 提交于 2021-01-01 06:28:09
问题 I have a Selenium Python test and I can run it from the batch file as follows: set TEST_HOME=%~dp0 cd %~dp0 SET PATH=%PATH%;G:\test_runners\selenium_regression_test_5_1_1\IEDriverServer\64bit cd %~dp0selenium_regression_test_5_1_1 set PYTHONPATH=%~dp0selenium_regression_test_5_1_1 c:\Python27\Scripts\nosetests.exe "%~dp0selenium_regression_test_5_1_1\Regression_TestCase\split_into_parts\RegressionProject_TestCase_Part1.py" --with-html --html-file="%~dp0selenium_regression_test_5_1_1

Selenium Python test batch file does not run in Task Scheduler, browser does not open. Batch file does run ok without task scheduler

时光总嘲笑我的痴心妄想 提交于 2021-01-01 06:25:25
问题 I have a Selenium Python test and I can run it from the batch file as follows: set TEST_HOME=%~dp0 cd %~dp0 SET PATH=%PATH%;G:\test_runners\selenium_regression_test_5_1_1\IEDriverServer\64bit cd %~dp0selenium_regression_test_5_1_1 set PYTHONPATH=%~dp0selenium_regression_test_5_1_1 c:\Python27\Scripts\nosetests.exe "%~dp0selenium_regression_test_5_1_1\Regression_TestCase\split_into_parts\RegressionProject_TestCase_Part1.py" --with-html --html-file="%~dp0selenium_regression_test_5_1_1

Run-time error '21' (VBA + Selenium+Chrome)

拥有回忆 提交于 2021-01-01 04:21:31
问题 Code is working well but after running several times it stuck with Run-time error '21'. It cannot open webdriver with run-time error '21': as attached picture. 'bot. start "Chrome" which is the code that has the error. Chrome version: 83.0.4103.97 Selenium: SeleniumBasic-2.0.9.0 enter image description here Dim bot As New WebDriver Dim ele As WebElement Dim picEle As WebElement Dim awbaLI As WebElements Dim AWB As List bot.Start "Chrome" bot.Get "https://google.com" 回答1: The error message

Run-time error '21' (VBA + Selenium+Chrome)

大憨熊 提交于 2021-01-01 04:20:56
问题 Code is working well but after running several times it stuck with Run-time error '21'. It cannot open webdriver with run-time error '21': as attached picture. 'bot. start "Chrome" which is the code that has the error. Chrome version: 83.0.4103.97 Selenium: SeleniumBasic-2.0.9.0 enter image description here Dim bot As New WebDriver Dim ele As WebElement Dim picEle As WebElement Dim awbaLI As WebElements Dim AWB As List bot.Start "Chrome" bot.Get "https://google.com" 回答1: The error message

Out of memory Error in Python+Selenium first load

南笙酒味 提交于 2020-12-31 16:21:19
问题 I'm trying, and failing, to open the website https://www.bet365.com with selenium and python. In my code, I've followed these steps. First, I just did from selenium import webdriver browser=webdriver.Chrome() browser.get('https://www.bet365.com') After a while, Bet365 changed something and doing the above returned a gray screen. In order to bypass that, I did the following from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("window-size=1920,1080") options

Out of memory Error in Python+Selenium first load

左心房为你撑大大i 提交于 2020-12-31 16:16:31
问题 I'm trying, and failing, to open the website https://www.bet365.com with selenium and python. In my code, I've followed these steps. First, I just did from selenium import webdriver browser=webdriver.Chrome() browser.get('https://www.bet365.com') After a while, Bet365 changed something and doing the above returned a gray screen. In order to bypass that, I did the following from selenium import webdriver options = webdriver.ChromeOptions() options.add_argument("window-size=1920,1080") options