本文整理汇总了Java中com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium类的典型用法代码示例。如果您正苦于以下问题:Java WebDriverBackedSelenium类的具体用法?Java WebDriverBackedSelenium怎么用?Java WebDriverBackedSelenium使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WebDriverBackedSelenium类属于com.thoughtworks.selenium.webdriven包,在下文中一共展示了WebDriverBackedSelenium类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildWebDriverInstance
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; //导入依赖的package包/类
/**
* By using the default URL, creates a WebDriver object and Selenium object as well.
*
* @param baseUrl is the default URL for the browser, must not be null!
* @return withthe new WebDriver object
*/
public WebDriver buildWebDriverInstance(final String baseUrl) {
if (browserString == null) {
throw new SimpleGepardException("No browser to be used was specified.");
}
DesiredCapabilities capabilities = detectCapabilities();
try {
webDriver = new RemoteWebDriver(buildWebDriverUrl(), capabilities);
selenium = new WebDriverBackedSelenium(webDriver, baseUrl);
selenium.setTimeout(DEFAULT_TIMEOUT); //set the default timeout
} catch (WebDriverException | SeleniumException e) {
throw new SimpleGepardException(e.getLocalizedMessage());
}
// hide all open windows on Mac, it is necessary to hide 'always on top' windows, otherwise useless screenshots will be created from desktop
if (getBrowserType() == BrowserEnum.Safari) {
selenium.keyPressNative(String.valueOf(KeyEvent.VK_F11));
}
return webDriver;
}
开发者ID:epam,项目名称:Gepard,代码行数:28,代码来源:WebDriverUtil.java
示例2: getWebDriverBackedSelenium
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; //导入依赖的package包/类
protected WebDriverBackedSelenium getWebDriverBackedSelenium() {
if (this._selenium == null) {
this._selenium = new WebDriverBackedSelenium(getDriver(),
"https://translate.google.com/");
this._selenium.open("/#" + _from + "/" + _to + "/");
}
return this._selenium;
}
开发者ID:brunocvcunha,项目名称:phantranslator,代码行数:10,代码来源:PhantranslatorExecutor.java
示例3: selenium
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; //导入依赖的package包/类
/**
* Selenium bean
* @param driver WebDriver
* @param baseUrl Url of web app
* @return Selenium
*/
@Bean
@Lazy(true)
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public Selenium selenium(WebDriver driver, String baseUrl){
return new WebDriverBackedSelenium(driver, baseUrl);
}
开发者ID:GiannisPapadakis,项目名称:seletest,代码行数:13,代码来源:ConfigurationDriver.java
示例4: setUp
import com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
WebDriver driver = new FirefoxDriver();
String baseUrl = "https://www.google.com.ar/";
selenium = new WebDriverBackedSelenium(driver, baseUrl);
}
开发者ID:soluciones3f,项目名称:nac-testing-3-autoasistido,代码行数:7,代码来源:SumaEnGoogleWebDriverBacked.java
注:本文中的com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论