Selenium - 在初始化RemoteWebDriver时使用InternetExplorerOptions()
我试图让IE通过Selenium网格初始化远程驱动程序时启动每个会话。这Selenium - 在初始化RemoteWebDriver时使用InternetExplorerOptions()
DesiredCapabilities caps = null;
caps = DesiredCapabilities.internetExplorer();
caps.setCapability(InternetExplorerDriver.IE_ENSURE_CLEAN_SESSION, true);
WebDriver driver = new RemoteWebDriver(new URL("http://10.10.22.126:5555/wd/hub"), caps);
不工作,IE开始从前面的测试,这会导致问题的饼干每一个新的考验。我想实现这个
InternetExplorerOptions ieOptions = new InternetExplorerOptions()
.destructivelyEnsureCleanSession();
所决定here,但我无法弄清楚如何使用这个作为远程驱动器,而不是在本地。谢谢!
可以在一定程度上这种方式设置的选项作为一种能力:
InternetExplorerOptions ieOptions = new InternetExplorerOptions()
.destructivelyEnsureCleanSession();
capabilities.setCapability("se:ieOptions", ieOptions);
的InternetExplorerOptions
类定义这个能力为常数:
private final static String IE_OPTIONS = "se:ieOptions";
有趣。你能告诉我那是干什么吗? – kroe761
@ kroe761这会将该选项设置为您的驱动程序的一项功能。 – nullpointer
好吧,是的,但我对“se:ieOptions”更感兴趣。我从来没有碰到过。 – kroe761
不设置此'ieOptions'的能力不行? – nullpointer