package com.thoughtworks.selenium.grid.examples.java;
import static com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.closeSeleniumSession;
import static com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.session;
import static com.thoughtworks.selenium.grid.tools.ThreadSafeSeleniumSessionStorage.startSeleniumSession;
import static org.testng.AssertJUnit.assertTrue;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Parameters;
/**
* Base class for all tests in Selenium Grid Java examples.
*/
public class GoogleImageTestBase {
public static final String TIMEOUT = "120000";
@BeforeMethod(groups = {"default", "example"}, alwaysRun = true)
@Parameters({"seleniumHost", "seleniumPort", "browser", "webSite"})
protected void startSession(String seleniumHost, int seleniumPort, String browser, String webSite) {
startSeleniumSession(seleniumHost, seleniumPort, browser, webSite);
session().setTimeout(TIMEOUT);
}
@AfterMethod(groups = {"default", "example"}, alwaysRun = true)
protected void closeSession() {
closeSeleniumSession();
}
protected void runScenario(String searchString) {
session().open("/");
assertTrue(session().getLocation(), session().getLocation().contains("images.google.com"));
session().type("q", searchString);
session().click("btnG");
session().waitForPageToLoad(TIMEOUT);
session().click("rptgl");
session().click("imgsz_l");
session().click("imgtype_photo");
session().click("btnG");
session().waitForPageToLoad(TIMEOUT);
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Selenium Grid 测试可用 (155个子文件)
selenium-check.bmp 665KB
Capfile 8KB
Capfile 3KB
GoogleImageTestBase.class 2KB
ParisTest.class 2KB
PerigordTest.class 1KB
home.css 4KB
faq.css 2KB
document.css 1KB
Selenium Grid.css 1KB
site.css 1KB
openqa.css 1019B
Selenium Grid Logo.graffle 54KB
run_the_demo.html 12KB
index.html 12KB
continuous_testing_with_selenium_grid_subversion_and_hudson.html 12KB
how_it_works.html 10KB
setting_up_selenium_grid_on_ec2.html 8KB
run_the_demo_on_ec2.html 5KB
step_by_step_installation_instructions_for_linux.html 5KB
step_by_step_installation_instructions_for_osx.html 5KB
get_started.html 4KB
using_selenium_grid_on_ec2.html 4KB
step_by_step_installation_instructions_for_windows.html 4KB
participate.html 3KB
give_feedback.html 3KB
hack.html 3KB
Philosophy.html 2KB
download.html 2KB
build_it_from_source.html 1KB
TestNG Example.iml 791B
Ruby Example.iml 714B
selenium-server-1.0.3-standalone.jar 15.43MB
selenium-grid-hub-standalone-1.0.8.jar 1.88MB
selenium-grid-remote-control-standalone-1.0.8.jar 1.03MB
selenium-grid-demo-standalone-1.0.8.jar 863KB
testng-5.7-jdk15.jar 805KB
selenium-java-client-driver-1.0.3.jar 54KB
selenium-grid-hub-1.0.8.jar 45KB
selenium-grid-tools-standalone-1.0.8.jar 39KB
commons-logging-1.0.4.jar 37KB
selenium-grid-remote-control-1.0.8.jar 21KB
selenium-grid-demo-1.0.8.jar 4KB
selenium-grid-tools-1.0.8.jar 2KB
GoogleImageTestBase.java 2KB
ParisTest.java 2KB
PerigordTest.java 1KB
jquery-1.3.2.min.js 56KB
faq.markdown 26KB
configuring-and-tuning.markdown 5KB
self-healing.markdown 3KB
Requesting a Specific Environment.png 171KB
Hudson - Config First Half.png 170KB
Multiple Environment Demo Setup.png 158KB
Multiple Machine Demo Setup.png 130KB
Selenium Grid Setup.png 129KB
Hudson - Config Second Half.png 120KB
background.png 118KB
Requesting a Specific Environment - Small.png 105KB
Multiple Environment Demo Setup - Small.png 105KB
Multiple Machine Demo Setup - Small.png 81KB
Selenium Grid Setup - Small.png 79KB
Traditional Selenium Setup.png 59KB
linux-selenium-sanity-check.png 41KB
Traditional Selenium Setup - Small.png 36KB
install_ant_osx_screenshot.png 36KB
Hudson - Node Configuration.png 36KB
sanity_check_osx_screenshot.png 34KB
installing_grid_osx_screenshot.png 30KB
update_path_win_screenshot.png 28KB
check_path_osx_screenshot.png 26KB
dot_profile_osx_screenshot.png 25KB
check_path_win_screenshot.png 25KB
java_version_osx_screenshot.png 24KB
ant_version_osx_screenshot.png 22KB
dot_profile_editing_osx_screenshot.png 22KB
Hudson - New Node.png 21KB
linux-ant-install.png 21KB
Hudson - New Job.png 18KB
kdmconfig.png 18KB
selenium-grid-logo-huge-white.png 18KB
linux-java-version.png 17KB
selenium-grid-logo-huge.png 17KB
sanity_check_win_screenshot.png 15KB
linux-selenium-install.png 14KB
linux-ant-verify.png 14KB
selenium_grid_logo_large.png 13KB
linux-ant-version.png 12KB
linux-ant-profile-update.png 11KB
selenium-grid-logo-large.png 11KB
Startup Wizard.png 10KB
tutorials.png 10KB
selenium-grid-logo.png 9KB
linux-navigate-path.png 9KB
ant_version_win_screenshot.png 7KB
selenium-grid-logo-small.png 7KB
java_version_win_screenshot.png 6KB
Track Header Background.png 4KB
rect2383.png 3KB
background_start_tracks.png 2KB
共 155 条
- 1
- 2
资源评论
- yyyyyylightning2014-06-03很好的东西,已经实践过了~
- wyl20112015-02-13怎么没有linux版本的呀
- 爱犬白雪2015-08-04资源很好 已经验证过了
- hwjyyd2015-10-22不错 不过os没有用
- dongfangbiaozhun0012016-08-02还行吧,谢谢分享
席飞剑
- 粉丝: 2239
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功