org.openqa.selenium.remote.internal.ApacheHttpClient源码实例Demo

类org.openqa.selenium.remote.internal.ApacheHttpClient源码实例Demo

下面列出了org.openqa.selenium.remote.internal.ApacheHttpClient 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@BeforeTest
@Override
public void Setup() throws Exception {
    super.Setup();

    DesiredCapabilities capabilities = new DesiredCapabilities();
    capabilities.setCapability("sessionName", "Android App Test - Override HTTP timeout for Appium client");
    capabilities.setCapability("sessionDescription", "Kobiton sample session");
    capabilities.setCapability("deviceOrientation", "portrait");
    capabilities.setCapability("captureScreenshots", true);
    capabilities.setCapability("app", "https://s3-ap-southeast-1.amazonaws.com/kobiton-devvn/apps-test/demo/com.dozuki.ifixit.apk");
    capabilities.setCapability("deviceName", "Galaxy J7");
    capabilities.setCapability("platformName", "Android");

    int connectionTimeout = 20 * 60 * 1000;
    int socketTimeout = 90 * 1000;
    ApacheHttpClient.Factory clientFactory = new ApacheHttpClient.Factory(new HttpClientFactory(connectionTimeout, socketTimeout));
    AppiumCommandExecutor executor = new AppiumCommandExecutor(new HashMap<>(), getAutomationUrl(), clientFactory);
    driver = new AndroidDriver<>(executor, capabilities);
}
 
private static synchronized HttpClient.Factory getDefaultClientFactory() {
	if (defaultClientFactory == null) {
		defaultClientFactory = new ApacheHttpClient.Factory();
	}
	return defaultClientFactory;
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法