当前位置: 首页>>代码示例>>Java>>正文


Java Configuration.browser方法代码示例

本文整理汇总了Java中com.codeborne.selenide.Configuration.browser方法的典型用法代码示例。如果您正苦于以下问题:Java Configuration.browser方法的具体用法?Java Configuration.browser怎么用?Java Configuration.browser使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.codeborne.selenide.Configuration的用法示例。


在下文中一共展示了Configuration.browser方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: baseTestBeforeClass

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@BeforeClass
public static void baseTestBeforeClass() {
    Configuration.browser = "chrome";
    Configuration.reopenBrowserOnFail = false;

    if (EnvironmentDetector.inLambda()) {
        WebDriverRunner.webdriverContainer = new LambdaWebDriverThreadLocalContainer();
    }
}
 
开发者ID:blackboard,项目名称:lambda-selenium,代码行数:10,代码来源:LambdaBaseTest.java

示例2: setup

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@BeforeClass
public static void setup() {
	//set up Selenide
	Configuration.timeout = 5 * 60 * 1000;
	Configuration.browser = TestConfiguration.syndesisBrowser();
	//getWebDriver().manage().window().setSize(new Dimension(1920, 1024));

	if (TestConfiguration.namespaceCleanup()) {
		CommonSteps commonSteps = new CommonSteps();
		commonSteps.cleanNamespace();
		commonSteps.deploySyndesis();
		commonSteps.waitForSyndeisis();
	}

}
 
开发者ID:syndesisio,项目名称:syndesis-qe,代码行数:16,代码来源:CucumberTest.java

示例3: search

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@Test
public void search() {
  Configuration.browser = "chrome";
  open("https://google.com/");
  $(By.name("q")).val("Selenide").pressEnter();
  $$("#ires .g").shouldHave(CollectionCondition.sizeGreaterThan(5));

  for (int i = 0; i < 5; i++) {
    SelenideElement link = $("#ires .g", i).find("a");
    System.out.println(link.attr("href"));
    link.click();
    back();
  }
  sleep(1000);
}
 
开发者ID:selenide-examples,项目名称:testcontainers,代码行数:16,代码来源:GoogleTest.java

示例4: configureTestOn

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
public static void configureTestOn(String testOn, Properties properties) {

    if (testOn.equals("grid")) {
      //!!!to run node - use -Dwebdriver.firefox.marionette=false - for FireFox<=47.0.1 usage
      Configuration.remote = properties.getProperty("test.grid.url");
      Configuration.browser = properties.getProperty("test.grid.browser", "chrome");
      System.setProperty("capabilities.marionette", "false");
    } else if (testOn.equals("browserStack")) {
      Configuration.remote = "https://" + properties.getProperty("test.browserStack.userName") + ":" + properties.getProperty("test.browserStack.automateKey") + "@hub-cloud.browserstack.com/wd/hub";
      System.setProperty("capabilities.browserstack.debug", "true");
      PropertiesHelper.fillCapabilities("test.browserStack", properties);
    } else if (testOn.equals("sauceLabs")) {
      String remoteUrl = "https://" + properties.getProperty("test.sauceLabs.userName") + ":" + properties.getProperty("test.sauceLabs.automateKey") + "@ondemand.saucelabs.com:443/wd/hub";
      if (properties.getProperty("test.sauceLabs.capabilities.appiumVersion") != null) {
        AppiumDriverProvider.setCapabilities(getCapabilities("test.sauceLabs", properties));
        AppiumDriverProvider.setUrl(remoteUrl);
        Configuration.browser = AppiumDriverProvider.class.getName();
      } else {
        Configuration.browser = properties.getProperty("test.sauceLabs.browser");
        Configuration.remote = remoteUrl;
        PropertiesHelper.fillCapabilities("test.sauceLabs", properties);
      }
    } else {
      //by default = local
      Configuration.browser = properties.getProperty("test.local.browser", "chrome");
    }
  }
 
开发者ID:automician,项目名称:snippets,代码行数:28,代码来源:PropertiesHelper.java

示例5: BasePage

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
BasePage() {
    ChromeDriverManager.getInstance().setup();
    Configuration.browser = "chrome";
}
 
开发者ID:endless-qa,项目名称:webdriver-examples-java,代码行数:5,代码来源:BasePage.java

示例6: setUp

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@Before
public void setUp() {
  Configuration.browser = AndroidDriverProvider.class.getName();
}
 
开发者ID:codeborne,项目名称:selenide-appium,代码行数:5,代码来源:BaseTest.java

示例7: before

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@Before
public void before(){
    Configuration.browser = WebDriverRunner.GECKO;
    //Configuration.browser = "edge";
    System.setProperty("webdriver.gecko.driver","/PATH/TO/geckodriver.exe");
}
 
开发者ID:shimashima35,项目名称:codezine-sample,代码行数:7,代码来源:SampleTest.java

示例8: selenideTest

import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@Test(dataProviderClass=CVData.class, dataProvider = "cvData")
public void selenideTest(Attendee attendee, Job job) throws IOException {

    //System.setProperty("webdriver.chrome.driver", "C:\\Selenium\\chromedriver.exe");
    Configuration.browser="chrome";

    open(PageJobs.url);
    PageJobs.applyLinkFor(job.name, job.category).click();

    WebSettings.useDriver(()->getWebDriver());

    pageJobDescription.submitForm(attendee);
    pageJobDescription.verifyCVForm(attendee);

    WebSettings.initFromProperties();
    }
 
开发者ID:epam,项目名称:JDI,代码行数:17,代码来源:TableFormSelenideTest.java


注:本文中的com.codeborne.selenide.Configuration.browser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。