webdriver

set up python with htmlunit driver

久未见 提交于 2021-01-07 04:56:37
问题 i am trying to set up python with selenium htmlunit driver on ubuntu 18.04. launching selenium standalone server java -jar selenium-server-standalone-3.141.59.jar output 00:00:46.177 INFO [GridLauncherV3.parse] - Selenium server version: 3.141.59, revision:e82be7d358 00:00:46.299 INFO [GridLauncherV3.lambda$buildLaunchers$3] - Launching a standalone Selenium Server on port 4444 2020-05-25 00:00:46.366:INFO::main: Logging initialized @483ms to org.seleniumhq.jetty9.util.log.StdErrLog 00:00:46

Using permanent profiles and cookies in Selenium

瘦欲@ 提交于 2021-01-07 03:10:09
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out

Using permanent profiles and cookies in Selenium

北战南征 提交于 2021-01-07 03:09:12
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out

Using permanent profiles and cookies in Selenium

纵饮孤独 提交于 2021-01-07 03:08:22
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out

Using permanent profiles and cookies in Selenium

我只是一个虾纸丫 提交于 2021-01-07 03:07:32
问题 I have a Django website and I'm using Selenium. I want to have one or two permanent profiles with Chrome or Firefox, to check that users remain logged in for example after I upgrade Django and then users login from another profile/session (the default is not to remain logged in, but I patched Django to remain logged in). For this I need permanent profiles and cookies. I want to login once, and then check that I'm still logged in the next time I run Selenium tests. I searched and found out

SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81 using Selenium ChromeDriver v81

懵懂的女人 提交于 2021-01-06 02:43:30
问题 I imported webdriver from selenium and os. I want to be able to run this piece of code successfully: driver = webdriver.Chrome(executable_path= os.path.abspath('') + '/chromedriver') The error I'm getting: selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81 I'm using python 2.7 on a MAC OSX. I have version 81.0.4044.138 of the chromedriver installed from https://sites.google.com/a/chromium.org

TypeError: 'str' object is not callable using Selenium through Python

守給你的承諾、 提交于 2021-01-05 06:46:10
问题 When I try to do code shown below I get error : TypeError: 'str' object is not callable email2_elem = driver.find_element_by_xpath("/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/form[1]/div[1]/input[1]").text() 回答1: This error message... TypeError: 'str' object is not callable ...implies that your program have invoked a function() which is actually a property . As per selenium.webdriver.remote.webelement text is a property . So, you can't invoke text() as a function. Hence you see the error.

TypeError: 'str' object is not callable using Selenium through Python

耗尽温柔 提交于 2021-01-05 06:45:15
问题 When I try to do code shown below I get error : TypeError: 'str' object is not callable email2_elem = driver.find_element_by_xpath("/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/form[1]/div[1]/input[1]").text() 回答1: This error message... TypeError: 'str' object is not callable ...implies that your program have invoked a function() which is actually a property . As per selenium.webdriver.remote.webelement text is a property . So, you can't invoke text() as a function. Hence you see the error.

TypeError: 'str' object is not callable using Selenium through Python

倾然丶 夕夏残阳落幕 提交于 2021-01-05 06:42:21
问题 When I try to do code shown below I get error : TypeError: 'str' object is not callable email2_elem = driver.find_element_by_xpath("/html/body/div[1]/div[2]/div[1]/div[1]/div[1]/form[1]/div[1]/input[1]").text() 回答1: This error message... TypeError: 'str' object is not callable ...implies that your program have invoked a function() which is actually a property . As per selenium.webdriver.remote.webelement text is a property . So, you can't invoke text() as a function. Hence you see the error.

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