selenium3

Unable to suppress a firefox pop-up for a file download

 ̄綄美尐妖づ 提交于 2020-05-15 06:05:29
问题 Firefox - 51.0.1 Selenium - 3.0.5 Ubuntu - 16.04 (64bit) Here is what my code looks like: profile = Selenium::WebDriver::Firefox::Profile.new profile['browser.download.dir'] = "/tmp/webdriver-downloads" profile['browser.download.folderList'] = 2 profile['browser.helperApps.neverAsk.saveToDisk'] = "application/pdf" profile['pdfjs.disabled'] = true driver = Selenium::WebDriver.for :firefox, :profile => profile driver.get "https://s3.amazonaws.com/shopsocially-misc/vfs/vfs_test_sample.csv"

Selenium using Java: Start Hub Server and register Nodes with Hub

匆匆过客 提交于 2020-01-07 06:41:11
问题 I am new to the selenium and I have been trying to start Selenium Hub and adding the node to the Hub using java. I have started it using command prompt but I want it to happen on its own. I am able to start the Hub but have no Idea how to add the Node. Following is my code to start the Hub: import org.openqa.grid.internal.utils.configuration.GridHubConfiguration; import org.openqa.grid.internal.utils.configuration.GridNodeConfiguration; import org.openqa.grid.web.Hub; public class StartHub {

user:pass proxies with selenium

限于喜欢 提交于 2019-12-18 04:18:36
问题 What is the best/easiest way to use user authenticated proxies in a program? I currently have this but I need username and password to be already filled in when browser opens. from selenium import webdriver PROXY = "123.123.123.243:80" chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--proxy-server=http://{}".format(PROXY)) print(chrome_options.arguments) chrome = webdriver.Chrome(executable_path="drivers/chromedriver",chrome_options=chrome_options) chrome.get("https:/

Invalid certificate error with Geckodriver on FF 51

て烟熏妆下的殇ゞ 提交于 2019-12-12 02:23:22
问题 I am using Selenium 3 on Firefox 51.0.1 with Geckodriver release v0.14.0. I am getting an error on the browser trying to open the URL, and it says the connection is not secure (certificate error), although I checked the certificate and it is valid. The error is this: Command failed: open target="" value="https://mydomain.mysite.com/default" -> Reached error page: about:certerror?e=nssBadCert&u=https%3A//mydomain.mysite.com/default&c=UTF-8&f=regular&d=mydomain.mysite.com%20uses%20an%20invalid

How to set verbosity of marionette driver?

随声附和 提交于 2019-12-02 11:39:34
问题 Unable to manage verbosity of marionette driver!! Environment: Gecko driver 0.17.0 Selenium java 3.5.3 Firefox 52.3 Tried: FirefoxOptions options = new FirefoxOptions(); options.addPreference("log", "{level: info}"); DesiredCapabilities ffCapabilities = DesiredCapabilities.firefox(); ffCapabilities.setCapability("moz:firefoxOptions", options); ffCapabilities.setCapability("marionette", true); driver = new FirefoxDriver(ffCapabilities); Log Info: INFO: Preferring the firefox binary in these

How to set up selenium 3.0, getting error “The geckodriver.exe file does not exist…” in c#

耗尽温柔 提交于 2019-12-01 01:26:55
问题 Updated selenium in visual studio to 3.0 and firefox to 47.0 and now I'm getting this error when I try to use local webdriver mode: The geckodriver.exe file does not exist in the current directory or in a directory on the PATH environment variable. When I'm using remote mode (seleniumhub), it works fine even if it uses firefox 45.0 version. Tried to search for some examples, but did not found anything for c#, only for java and still could not make it work. my webdriver setup: switch

WebDriverException: Message: The command 'GET /session/7…/displayed' was not found while Explicit Wait with safaridriver and Selenium 3.13.0

房东的猫 提交于 2019-11-26 17:14:04
问题 I am using explicit wait like below to check if element is clickable. WebDriverWait(driver, 30).until( expected_conditions.element_to_be_clickable((By.CSS_SELECTOR, "#search"))) But I get error <class 'selenium.common.exceptions.WebDriverException'> Message: The command 'GET /session/.../displayed' was not found. If I use time.sleep() it works fine instead of explicir wait it works fine. I have initialized safari driver as from selenium.webdriver import Safari driver = Safari() Here is