- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
好的,我又回来了……带着另一个 Selenium 3.x/geckodriver 问题。
我目前有一个设置,我通过 browsermob-proxy 路由来 self 的 selenium 测试的所有网络流量,因此我的测试要求我向他们提供代理信息以路由所有这些数据,以便稍后我可以查询它。
我目前遇到一个问题,无论我如何尝试设置代理,我都会从我的测试中得到不同的异常。
尝试一:通过socks设置代理
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.socks", "localhost");
profile.setPreference("network.proxy.socks_port", 9091);
此尝试导致以下堆栈跟踪:
Caused by: org.openqa.selenium.SessionNotCreatedException:
InvalidArgumentError: Expected [object Undefined] undefined to be an integer
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
0: 0x10d573754 - backtrace::backtrace::trace::h8e94df436d083743
1: 0x10d573b2f - backtrace::capture::Backtrace::new::he142908a5a8f9eda
2: 0x10d203cbf - webdriver::error::WebDriverError::new::h160d25bec9197da5
3: 0x10d211442 - geckodriver::marionette::MarionetteSession::response::h970369545ccb2ae5
4: 0x10d2205aa - geckodriver::marionette::MarionetteConnection::send_command::h4b272021662c39d8
5: 0x10d20fd48 - _$LT$geckodriver..marionette..MarionetteHandler$u20$as$u20$webdriver..server..WebDriverHandler$LT$geckodriver..marionette..GeckoExtensionRoute$GT$$GT$::handle_command::h2c7905f1d7536e5d
6: 0x10d198d43 - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::hd1e66b7b65330ddf
7: 0x10d204b1a - webdriver::server::start::_$u7b$$u7b$closure$u7d$$u7d$::h690494072298ecdc
8: 0x10d0fcbaa - std::sys_common::backtrace::__rust_begin_short_backtrace::h9a6ad1a465c9c77e
9: 0x10d10dd83 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb084b9313dc657eb
10: 0x10d0bbb7a - _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9e0d4487cab44eb7
11: 0x10d10e8b9 - std::panicking::try::do_call::hd4a4ecf8d08f7d4d
12: 0x10d89567c - __rust_maybe_catch_panic
13: 0x10d10e6ec - std::panicking::try::hdaf1b8a3b363a07e
14: 0x10d10b5e5 - std::panic::catch_unwind::h9643785660d717d4
15: 0x10d10da3e - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hc86bbe5d0f3f926a
16: 0x10d17b663 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h9cb8abeb542e88ca
17: 0x10d8918eb - std::sys::imp::thread::Thread::new::thread_start::h2d2a40d6b00ba029
18: 0x7fff99df499c - _pthread_body
19: 0x7fff99df4919 - _pthread_start
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
尝试 2:通过 JSON 设置
JsonObject json = new JsonObject();
json.addProperty("proxyType", "MANUAL");
json.addProperty("httpProxy", "127.0.0.1");
json.addProperty("httpProxyPort", 9091);
json.addProperty("sslProxy", "127.0.0.1");
json.addProperty("sslProxyPort", 9091);
capabilities.setCapability("proxy", json);
这导致以下堆栈跟踪:
Caused by: org.openqa.selenium.InvalidArgumentException:
httpProxyPort was not a valid proxy configuration capability
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
0: 0x107004754 - backtrace::backtrace::trace::h8e94df436d083743
1: 0x107004b2f - backtrace::capture::Backtrace::new::he142908a5a8f9eda
2: 0x106d19c3f - webdriver::error::WebDriverError::new::h3c5206efc2aea993
3: 0x106d07fe9 - webdriver::capabilities::SpecNewSessionParameters::validate_proxy::h0d2c552864af830d
4: 0x106c93b2b - webdriver::capabilities::SpecNewSessionParameters::validate::ha71de94fac9331d9
5: 0x106b509e6 - _$LT$webdriver..capabilities..SpecNewSessionParameters$u20$as$u20$webdriver..capabilities..CapabilitiesMatching$GT$::match_browser::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h1c32cd867ef807c3
6: 0x106bbf37b - _$LT$core..result..Result$LT$T$C$$u20$E$GT$$GT$::and_then::hf76bfa0e307d12b7
7: 0x106b4fd44 - _$LT$webdriver..capabilities..SpecNewSessionParameters$u20$as$u20$webdriver..capabilities..CapabilitiesMatching$GT$::match_browser::_$u7b$$u7b$closure$u7d$$u7d$::ha440f562183a4100
8: 0x106beb870 - core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnOnce$LT$A$GT$$u20$for$u20$$RF$$u27$a$u20$mut$u20$F$GT$::call_once::h97d995e0820d8c8b
9: 0x106b80fd5 - _$LT$core..option..Option$LT$T$GT$$GT$::map::hec1c45e28df3f669
10: 0x106c7ed4c - _$LT$core..iter..Map$LT$I$C$$u20$F$GT$$u20$as$u20$core..iter..iterator..Iterator$GT$::next::h3e80bbc98e18278b
11: 0x106b6b156 - _$LT$$LT$core..result..Result$LT$V$C$$u20$E$GT$$u20$as$u20$core..iter..traits..FromIterator$LT$core..result..Result$LT$A$C$$u20$E$GT$$GT$$GT$..from_iter..Adapter$LT$Iter$C$$u20$E$GT$$u20$as$u20$core..iter..iterator..Iterator$GT$::next::hef0037ea92f136e0
12: 0x106c69db6 - _$LT$$RF$$u27$a$u20$mut$u20$I$u20$as$u20$core..iter..iterator..Iterator$GT$::next::h13a60fd6da24f240
13: 0x106c84069 - _$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$alloc..vec..SpecExtend$LT$T$C$$u20$I$GT$$GT$::from_iter::h3c5cd3bebd0b7a94
14: 0x106c85ebb - _$LT$alloc..vec..Vec$LT$T$GT$$u20$as$u20$core..iter..traits..FromIterator$LT$T$GT$$GT$::from_iter::h0a9ec0a7d8599d2f
15: 0x106b5517b - _$LT$core..result..Result$LT$V$C$$u20$E$GT$$u20$as$u20$core..iter..traits..FromIterator$LT$core..result..Result$LT$A$C$$u20$E$GT$$GT$$GT$::from_iter::h3912ad22da5fa8a1
16: 0x106c05d06 - core::iter::iterator::Iterator::collect::h37a3ccf2360609f5
17: 0x106b4f700 - _$LT$webdriver..capabilities..SpecNewSessionParameters$u20$as$u20$webdriver..capabilities..CapabilitiesMatching$GT$::match_browser::h68cf564270268ccf
18: 0x106b4e5f5 - _$LT$webdriver..command..NewSessionParameters$u20$as$u20$webdriver..capabilities..CapabilitiesMatching$GT$::match_browser::hbc7b5070d6ac176e
19: 0x106c9dcb7 - geckodriver::marionette::MarionetteHandler::create_connection::h48a7098743d092a0
20: 0x106ca0a71 - _$LT$geckodriver..marionette..MarionetteHandler$u20$as$u20$webdriver..server..WebDriverHandler$LT$geckodriver..marionette..GeckoExtensionRoute$GT$$GT$::handle_command::h2c7905f1d7536e5d
21: 0x106c29d43 - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::hd1e66b7b65330ddf
22: 0x106c95b1a - webdriver::server::start::_$u7b$$u7b$closure$u7d$$u7d$::h690494072298ecdc
23: 0x106b8dbaa - std::sys_common::backtrace::__rust_begin_short_backtrace::h9a6ad1a465c9c77e
24: 0x106b9ed83 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb084b9313dc657eb
25: 0x106b4cb7a - _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9e0d4487cab44eb7
26: 0x106b9f8b9 - std::panicking::try::do_call::hd4a4ecf8d08f7d4d
27: 0x10732667c - __rust_maybe_catch_panic
28: 0x106b9f6ec - std::panicking::try::hdaf1b8a3b363a07e
29: 0x106b9c5e5 - std::panic::catch_unwind::h9643785660d717d4
30: 0x106b9ea3e - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hc86bbe5d0f3f926a
31: 0x106c0c663 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h9cb8abeb542e88ca
32: 0x1073228eb - std::sys::imp::thread::Thread::new::thread_start::h2d2a40d6b00ba029
33: 0x7fff99df499c - _pthread_body
34: 0x7fff99df4919 - _pthread_start
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
尝试三:通过setPreference设置,不穿 socks
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http", "localhost");
profile.setPreference("network.proxy.http_port", 9091);
这导致以下堆栈跟踪:
Caused by: org.openqa.selenium.SessionNotCreatedException:
InvalidArgumentError: Expected [object Undefined] undefined to be an integer
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
remote stacktrace: stack backtrace:
0: 0x10f5b6754 - backtrace::backtrace::trace::h8e94df436d083743
1: 0x10f5b6b2f - backtrace::capture::Backtrace::new::he142908a5a8f9eda
2: 0x10f246cbf - webdriver::error::WebDriverError::new::h160d25bec9197da5
3: 0x10f254442 - geckodriver::marionette::MarionetteSession::response::h970369545ccb2ae5
4: 0x10f2635aa - geckodriver::marionette::MarionetteConnection::send_command::h4b272021662c39d8
5: 0x10f252d48 - _$LT$geckodriver..marionette..MarionetteHandler$u20$as$u20$webdriver..server..WebDriverHandler$LT$geckodriver..marionette..GeckoExtensionRoute$GT$$GT$::handle_command::h2c7905f1d7536e5d
6: 0x10f1dbd43 - _$LT$webdriver..server..Dispatcher$LT$T$C$$u20$U$GT$$GT$::run::hd1e66b7b65330ddf
7: 0x10f247b1a - webdriver::server::start::_$u7b$$u7b$closure$u7d$$u7d$::h690494072298ecdc
8: 0x10f13fbaa - std::sys_common::backtrace::__rust_begin_short_backtrace::h9a6ad1a465c9c77e
9: 0x10f150d83 - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb084b9313dc657eb
10: 0x10f0feb7a - _$LT$std..panic..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9e0d4487cab44eb7
11: 0x10f1518b9 - std::panicking::try::do_call::hd4a4ecf8d08f7d4d
12: 0x10f8d867c - __rust_maybe_catch_panic
13: 0x10f1516ec - std::panicking::try::hdaf1b8a3b363a07e
14: 0x10f14e5e5 - std::panic::catch_unwind::h9643785660d717d4
15: 0x10f150a3e - std::thread::Builder::spawn::_$u7b$$u7b$closure$u7d$$u7d$::hc86bbe5d0f3f926a
16: 0x10f1be663 - _$LT$F$u20$as$u20$alloc..boxed..FnBox$LT$A$GT$$GT$::call_box::h9cb8abeb542e88ca
17: 0x10f8d48eb - std::sys::imp::thread::Thread::new::thread_start::h2d2a40d6b00ba029
18: 0x7fff99df499c - _pthread_body
19: 0x7fff99df4919 - _pthread_start
Build info: version: '3.5.3', revision: 'a88d25fe6b', time: '2017-08-29T12:42:44.417Z'
System info: host: 'Administrators-MacBook-Pro.local', ip: 'fe80:0:0:0:a299:9bff:fe05:a43b%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.8.0_77'
Driver info: driver.version: unknown
使用 geckodriver 和 selenium 设置代理的合适方法是什么?
我正在使用 Selenium 3.5.3 和 geckodriver 0.19
提前致谢!
编辑:
这是我用来对 Firefox 和其他浏览器进行这些修改的整个方法......我正在使用 Selion,所以这也可能是一个因素。
package com.iacapps.ste.ta.helpers;
import com.google.common.base.Strings;
import com.paypal.selion.platform.grid.Grid;
import com.paypal.selion.platform.grid.browsercapabilities.DefaultCapabilitiesBuilder;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.CapabilityType;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Collections;
public class CustomCapabilities extends DefaultCapabilitiesBuilder
{
private static final Logger logger = LoggerFactory.getLogger(DefaultCapabilitiesBuilder.class);
private static final String SAUCE_TUNNEL_PROPERTY = "sauceTunnel";
private static final String SAUCE_ENABLED_PROPERTY = "enableSauceConnect";
private static final String TUNNEL_CAPABILITY = "tunnelIdentifier";
private static final String ACCEPT_ALL_SSL_CAPABILITY = "acceptSslCerts";
private static final String CHROME_SWITCHES = "chrome.switches";
private static final String CHROME_IGNORE_SSL = "--ignore-certificate-errors";
private static final String FIREFOX_ACCEPT_BAD_CERTS_CAPABILITY = "acceptInsecureCerts";
@Override
public DesiredCapabilities getCapabilities(DesiredCapabilities capabilities)
{
String sauceEnabledValue = System.getProperty(SAUCE_ENABLED_PROPERTY);
String tunnelIdValue = System.getProperty(SAUCE_TUNNEL_PROPERTY);
//This will just prevent the warning being printed when sauceconnect isn't enabled.
if (!Strings.isNullOrEmpty(sauceEnabledValue) && Boolean.valueOf(sauceEnabledValue))
{
if (Strings.isNullOrEmpty(tunnelIdValue))
{
logger.warn("{} not set", SAUCE_TUNNEL_PROPERTY);
}
else
{
// TODO: Maybe move this to non-firefox browsers??
//capabilities.setCapability(TUNNEL_CAPABILITY, tunnelIdValue);
}
}
// Seems like with the latest version of selenium (3.x) we need to be kinda specific about
// making sure that we're going to pass the right configuration crap to the particular drivers.
// So for now, I'm just going to make some broad strokes and make things so that we know
// if we're on firefox or "not firefox". This might need to be changed/updated as we see that
// other browsers aren't going to play nice with this, but well. I hope it fixes it for now :)
if (!Grid.getWebTestSession().getBrowser().contains("firefox"))
{
//There's a reason for this charlie foxtrot. I don't always get to know what browser driver I'm
//talking to.
//Per selenium docs: "Whether the session should accept all SSL certs by default."
//The DOWNSIDE: this seems to work with newer browser drivers, but it may not work with old ones.
capabilities.setCapability(ACCEPT_ALL_SSL_CAPABILITY, true);
//This *supposedly* works with some versions of IE.
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
//This *supposedly* works with some chrome versions.
capabilities.setCapability(CHROME_SWITCHES, Collections.singletonList(CHROME_IGNORE_SSL));
}
if (Grid.getWebTestSession().getBrowser().contains("firefox"))
{
//Oh my god please work you STUPID FIREFOX
//http://stackoverflow.com/a/40788935
//https://bugzilla.mozilla.org/show_bug.cgi?id=1103196
//Should work with firefox > v51
capabilities.setCapability(FIREFOX_ACCEPT_BAD_CERTS_CAPABILITY,true);
//When in doubt SET EVERYTHING!
FirefoxProfile profile = new FirefoxProfile();
// Okay, let's try this socks stuff
// Okay, socks doesn't work either. Same object undefined nonsense.
/*profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.socks", "localhost");
profile.setPreference("network.proxy.socks_port", 9091);*/
// When attempting to set via profile, I get this
// InvalidArgumentError: Expected [object Undefined] undefined to be an integer
profile.setPreference("network.proxy.type", 1);
profile.setPreference("network.proxy.http", "127.0.0.1");
profile.setPreference("network.proxy.http_port", 9091);
// JSON Type 1.
// So with the JSON object I get a httpProxyPort not a valid option....
/*JsonObject json = new JsonObject();
json.addProperty("proxyType", "MANUAL");
json.addProperty("httpProxy", "127.0.0.1");
json.addProperty("httpProxyPort", 9091);
json.addProperty("sslProxy", "127.0.0.1");
json.addProperty("sslProxyPort", 9091);
capabilities.setCapability("proxy", json);*/
// JSON type 2.
// So with the JSON object I get a httpProxyPort not a valid option....
/*JsonObject json = new JsonObject();
json.addProperty("proxyType", "manual");
json.addProperty("httpProxy", "localhost");
json.addProperty("httpProxyPort", 9091);
//json.addProperty("ftpProxy", "localhost");
//json.addProperty("ftpProxyPort", 9091);
json.addProperty("sslProxy", "localhost");
json.addProperty("sslProxyPort", 9091);
capabilities.setCapability(CapabilityType.PROXY, json);*/
profile.setAcceptUntrustedCertificates(true);
profile.setAssumeUntrustedCertificateIssuer(false);
profile.setPreference("broswer.tabs.remote.autostart.2", false);
capabilities.setCapability(FirefoxDriver.PROFILE,profile);
// Marionette is for older versions of firefox with geckodriver. So if you want to do
// That you need to have it enabled.
// Currently I'm getting a few different results depending on what I have this set to.
// TRUE or not set:
// Session not created: InvalidArgumentError: Expected [object Undefined] undefined to be an integer
// Opens browser. Closes it too. Fails right away.
// FALSE:
// java.lang.reflect.InvocationTargetException
// Opens the browser and then doesn't do anything with it. Times out.
//capabilities.setCapability(FirefoxDriver.MARIONETTE,true);
}
return capabilities;
}
}
最佳答案
经过几天的努力阅读论坛等发现 Firefox 版本 57 有帮助!它在该版本中已修复。使用 selenium-java 3.6.0、selenium firefox 驱动程序 3.6.0、firefox 57(目前为 beta)、mac os x 10.12.6、geckodriver 0.19.0 解决了这个问题!
//call with String "host:port"
private FirefoxDriver createDriverWithProxy( String proxyIpPort) {
org.openqa.selenium.Proxy proxy = new org.openqa.selenium.Proxy();
proxy.setHttpProxy(proxyIpPort)
.setFtpProxy(proxyIpPort)
.setSslProxy(proxyIpPort);
DesiredCapabilities cap = new DesiredCapabilities();
cap.setCapability(CapabilityType.PROXY, proxy);
FirefoxOptions options = new FirefoxOptions(cap);
FirefoxDriver driver = new FirefoxDriver(options);
return driver;
}
关于java - Geckodriver/Selenium 3.x 似乎不喜欢代理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46552101/
我创建了一个测试脚本,使用 python 在 Eclipse 中打开一个 url,但出现以下错误: Traceback (most recent call last): File "/Librar
我有一些 Robot Framework使用 SeleniumLibrary 的测试套件.我使用 Firefox 和 geckodriver 运行这些测试。每当我运行测试套件时,都会创建一个 geck
在我的应用程序中,我无法使用 System.setProperty 设置 geckodriver 可执行位置,并且无法在路径中设置它。为什么?因为我的应用程序是 Multi-Tenancy 的....
我列出了系统中安装的当前 npm 版本以及尝试安装 geckodriver 时发生的错误。我阅读了 [npm 模块版本] - [geckodriver 版本]1.10.x - geckodriver
我对 Pycharm 或 Python 的了解不够深,无法解决问题所在。在我看来,似乎应该执行这段简单的代码,但我得到了一堆对我来说没有任何意义的文本。 使用 Selenium 的其他人会遇到此错误并
当我尝试执行我的第一个 Selenium/python 代码时出现此错误。 selenium.common.exceptions.WebDriverException: Message: 'Gecko
我正在使用 headless ubuntu,并想安装最新的 geckodriver。 所以我必须通过输入命令行来安装。 我的 ubuntu 是 14.04 值得信赖的。 但是,我不知道安装 gecko
我正在做一个简单的机器人,用于使用 selenium 在 java/swing 中自动执行用户任务。 Selenium 需要在客户端计算机上安装 geckodriver。我应该如何交付该驱动程序? 放
驱动程序:geckodriver 0.19.1。 操作系统名称:Microsoft Windows 10 Pro for Workstations 版本:10.0.17134 Build 17134。
我已阅读之前关于此主题的问题并尝试遵循建议,但我仍然遇到错误。在终端上,我跑了 export PATH=$PATH:/Users/Conger/Documents/geckodriver-0.8.0-
我正在尝试在 Python 中使用 Selenium。但是,鉴于 https://pypi.python.org/pypi/selenium 的以下内容,我不知道该怎么做 Selenium 需要驱动程
我在 Windows 10 上运行 Selenium 3.141.0 和 python 3.6.7 我的脚本以 headless 方式运行 Firefox 驱动程序,但是来自 geckodriver
新的 geckodriver v0.17.0 有一种新的方式来安装插件,如上所述 here : POST /session/{session id}/window/fullscreen to invo
每次创建另一个测试时都需要添加 geckodriver 吗?例如: public class JUnit4 { @Test public void test1() {
我需要使用扩展来测试 Firefox。我想自动化测试并访问几个网站。 我安装了 Selenium,它在 geckodriver 中打开.但是,扩展不存在。我可以从 about:debugging 手动
我想以机器人方式填写网络表单。我在文档中添加了libraryclient-combined 3.0.0 beta 3。我的firefox版本应该是最新的。 import org.openqa.
我试图在我的 raspberry pi 3 in java 上使用 geckodriver设置 selenium webdriver。当我尝试启动 FirefoxDriver() 的实例时,我收到以下
我正在使用 Selenium/Maven/testng 编写自动测试。 测试在 Windows Server 2016 Standard 虚拟机上执行。 我想检查任务列表是否正在运行 geckodri
我有一个 webelement cells[-1] 我正在尝试单击并在新选项卡中打开它,然后从该页面上的链接下载一些内容,然后将其关闭并返回到原始状态选项卡。 我用过 actions.key_down
Selenium 设计为在处理 webdriver 实例时终止 Geckodriver 进程,如下所示:driver.quit()。在我的测试框架中,我已配置为在每次测试后调用 driver.quit
我是一名优秀的程序员,十分优秀!