本文整理汇总了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();
}
}
示例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();
}
}
示例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);
}
示例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");
}
}
示例5: BasePage
import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
BasePage() {
ChromeDriverManager.getInstance().setup();
Configuration.browser = "chrome";
}
示例6: setUp
import com.codeborne.selenide.Configuration; //导入方法依赖的package包/类
@Before
public void setUp() {
Configuration.browser = AndroidDriverProvider.class.getName();
}
示例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");
}
示例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();
}