import com.codeborne.selenide.Condition;import com.codeborne.selenide.Configuration;import com.codeborne.selenide.WebDriverRunner;import com.codeborne.selenide.impl.WebDriverContainer;import com.codeborne.selenide.impl.WebDriverThreadLocalContainer;import org.openqa.selenium.JavascriptExecutor;import org.testng.annotations.Test;import static com.codeborne.selenide.Selectors.byText;import static com.codeborne.selenide.Selenide.$;import static com.codeborne.selenide.Selenide.open;import static com.codeborne.selenide.Selenide.switchTo;/*** Created by sungaofei on 19/2/28.*/public class TechTest {@Testpublic void test1(){WebDriverContainer webdriverContainer = new WebDriverThreadLocalContainer();Configuration.screenshots = false;webdriverContainer.clearBrowserCache();//Configuration.browser="chrome";// Configuration.remote = "http://docker.testing-studio.com:5001/wd/hub";Configuration.remote = "http://59.110.171.91:8081/wd/hub";// String baseUrl = "http://docker.testing-studio.com:8999/";String baseUrl = "https://www.baidu.com";com.codeborne.selenide.Selenide.open(baseUrl);$(byText("网盘")).should(Condition.visible);System.out.print("");}// @Test// public void test2(){// WebDriverContainer webdriverContainer = new WebDriverThreadLocalContainer();// Configuration.screenshots = false;// webdriverContainer.clearBrowserCache();////// Configuration.browser="chrome";// Configuration.remote = "http://39.105.132.200:5001/wd/hub";//// String baseUrl = "http://jenkins.testing-studio.com:8999/";//// com.codeborne.selenide.Selenide.open(baseUrl);//// $(byText("Welcome Gaofei!")).should(Condition.visible);////// System.out.print("");// }////// @Test// public void test3(){// WebDriverContainer webdriverContainer = new WebDriverThreadLocalContainer();// Configuration.screenshots = false;// webdriverContainer.clearBrowserCache();////// Configuration.browser="chrome";// Configuration.remote = "http://39.105.132.200:5001/wd/hub";//// String baseUrl = "http://jenkins.testing-studio.com:8999/";//// com.codeborne.selenide.Selenide.open(baseUrl);//// $(byText("Welcome Gaofei!")).should(Condition.visible);////// System.out.print("");// }// public static void main(String[] args) {// WebDriverContainer webdriverContainer = new WebDriverThreadLocalContainer();// Configuration.screenshots = false;// webdriverContainer.clearBrowserCache();////// Configuration.browser="chrome";// Configuration.remote = "http://39.105.132.200:5001/wd/hub";//// String baseUrl = "http://jenkins.testing-studio.com:8999/";//// com.codeborne.selenide.Selenide.open(baseUrl);//// $(byText("Welcome Gaofei!")).should(Condition.visible);////// System.out.print("");// }}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。