• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Duration类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.openqa.selenium.support.ui.Duration的典型用法代码示例。如果您正苦于以下问题:Java Duration类的具体用法?Java Duration怎么用?Java Duration使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Duration类属于org.openqa.selenium.support.ui包,在下文中一共展示了Duration类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: done

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public static ExpectedCondition<Boolean> done(final Activity activity){
	return new DelayingExpectedCondition<Boolean>() {
		@Override
		public Boolean apply(WebDriver driver) {
		    
			return !activity.busyOn(driver);
		}

		@Override
		public String toString() {
			return activity.toString() + " to be done";
		}

           @Override
           public Duration initialDelay() {
               return activity.initialDelay();
           }
		
	};
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:21,代码来源:ExtraExpectedConditions.java


示例2: sleepSeconds

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
private void sleepSeconds(long seconds) {
	try {
		Sleeper.SYSTEM_SLEEPER.sleep(new Duration(seconds, java.util.concurrent.TimeUnit.SECONDS));
	} catch (InterruptedException e) {
		e.printStackTrace();
	}
}
 
开发者ID:redskyit,项目名称:ScriptDriver,代码行数:8,代码来源:RunTests.java


示例3: sleep

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
private void sleep(long ms) {
	try {
		Sleeper.SYSTEM_SLEEPER.sleep(new Duration(ms, java.util.concurrent.TimeUnit.MILLISECONDS));
	} catch (InterruptedException e) {
		e.printStackTrace();
	}
}
 
开发者ID:redskyit,项目名称:ScriptDriver,代码行数:8,代码来源:RunTests.java


示例4: sleep

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public void sleep(Duration duration) {
    try {
        Sleeper.SYSTEM_SLEEPER.sleep(duration);
    } catch (InterruptedException e) {
        throw new RuntimeException(e);
    }
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:8,代码来源:Waiter.java


示例5: getInitialAjaxDelayForDriver

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public Duration getInitialAjaxDelayForDriver() {
    WebDriver webDriver = activeDriver();
    if (webDriver instanceof HtmlUnitDriver) {
        return null;
      //new Duration(0, MILLISECONDS);
    } else if (webDriver instanceof ChromeDriver) {
        return null;
    } else {
        return new Duration(1, SECONDS);
    }
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:12,代码来源:WebDriverFactory.java


示例6: SeleniumWait

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public SeleniumWait(WebDriver input) {
    super(input, new SystemClock(), new Sleeper() {
        @Override
        public void sleep(Duration duration) {
        }
    });

    ignoring(NoSuchElementException.class, StaleElementReferenceException.class);
    pollingEvery(100, TimeUnit.MILLISECONDS);
}
 
开发者ID:lesfurets,项目名称:selenium-lxc,代码行数:11,代码来源:SeleniumWait.java


示例7: DemoApplication

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
private DemoApplication(final WebDriver driver) {
       super(driver);
	try {
		Sleeper.SYSTEM_SLEEPER.sleep(new Duration(5, TimeUnit.SECONDS));
	} catch (InterruptedException e) {
		throw new RuntimeException("cannot wait", e);
   }
}
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:9,代码来源:DemoApplication.java


示例8: revealDemoDragMultiple

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public DemoDragMultiple revealDemoDragMultiple() {
try {
	Sleeper.SYSTEM_SLEEPER.sleep(new Duration(5, TimeUnit.SECONDS));
      return new DemoDragMultiple(driver, this).reveal();
} catch (InterruptedException e) {
	throw new RuntimeException("do the thing ");
}
  }
 
开发者ID:gwtd3,项目名称:gwt-d3,代码行数:9,代码来源:DemoApplication.java


示例9: waitMillis

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
protected void waitMillis(long timeout) throws InterruptedException {
	Sleeper.SYSTEM_SLEEPER.sleep(new Duration(timeout, TimeUnit.MILLISECONDS));
}
 
开发者ID:RUB-NDS,项目名称:PrOfESSOS,代码行数:4,代码来源:BrowserSimulator.java


示例10: RetryStatement

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public RetryStatement(Properties properties) {
    this.timeout = new Duration(Long.parseLong(properties.getProperty(TIMEOUT_KEY, "5")), TimeUnit.SECONDS);
    this.polling = new Duration(Long.parseLong(properties.getProperty(POLLING_KEY, "250")), TimeUnit.MILLISECONDS);
    this.ignoring = new ArrayList<>();
}
 
开发者ID:eroshenkoam,项目名称:htmlelements,代码行数:6,代码来源:RetryStatement.java


示例11: withTimeout

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public RetryStatement withTimeout(long time, TimeUnit unit) {
    this.timeout = new Duration(time, unit);
    return this;
}
 
开发者ID:eroshenkoam,项目名称:htmlelements,代码行数:5,代码来源:RetryStatement.java


示例12: pollingEvery

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public RetryStatement pollingEvery(long time, TimeUnit unit) {
    this.polling = new Duration(time, unit);
    return this;
}
 
开发者ID:eroshenkoam,项目名称:htmlelements,代码行数:5,代码来源:RetryStatement.java


示例13: waitForInitialDelay

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
private <V> void waitForInitialDelay(DelayingExpectedCondition<V> delayingExpectedCondition) {
    Duration initialDelay = delayingExpectedCondition.initialDelay();
    if (initialDelay != null) {
        sleep(initialDelay);
    }
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:7,代码来源:Waiter.java


示例14: initialDelay

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
@Override
public Duration initialDelay() {
    return WebDriverFactory.getInstance().getInitialAjaxDelayForDriver();
}
 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:5,代码来源:AjaxActivity.java


示例15: DefaultTimeout

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public DefaultTimeout() {
    this.duration = new Duration(DEFAULT_TIMEOUT_SECS, TimeUnit.SECONDS);
}
 
开发者ID:MagenTys,项目名称:cinnamon,代码行数:4,代码来源:DefaultTimeout.java


示例16: getDuration

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
@Override
public Duration getDuration() {
    return duration;
}
 
开发者ID:MagenTys,项目名称:cinnamon,代码行数:5,代码来源:DefaultTimeout.java


示例17: timeoutIn

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public static Timeout timeoutIn(final long time, final TimeUnit unit) {
    return () -> new Duration(time, unit);
}
 
开发者ID:MagenTys,项目名称:cinnamon,代码行数:4,代码来源:Timeouts.java


示例18: initialDelay

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
public Duration initialDelay(); 
开发者ID:jhc-systems,项目名称:redsniff,代码行数:2,代码来源:DelayingExpectedCondition.java


示例19: getDuration

import org.openqa.selenium.support.ui.Duration; //导入依赖的package包/类
Duration getDuration(); 
开发者ID:MagenTys,项目名称:cinnamon,代码行数:2,代码来源:Timeout.java



注:本文中的org.openqa.selenium.support.ui.Duration类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java CipherOutputStream类代码示例发布时间:2022-05-23
下一篇:
Java SVGSVGElement类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap