use of com.wikia.webdriver.common.core.url.Page in project selenium-tests by Wikia.
the class HTMLTitleTests method seo_guard.
@Test(groups = "seo_guard")
@Execute(asUser = User.USER)
public void seo_guard() {
String originalEnv = Configuration.getEnv();
try {
PrintWriter out = new PrintWriter("./logs/seo-guard.txt");
PrintWriter out2 = new PrintWriter("./logs/seo-guard2.txt");
for (String[] testCase : testCases) {
navigate.toUrl(new Page(testCase[0], testCase[1]).getUrl());
new Wait(driver).forElementVisible(By.cssSelector(".side-nav-toggle-2016"));
this.pushMetaTagsToFile(out);
if (!originalEnv.equals("prod")) {
Configuration.setTestValue("env", "prod");
navigate.toUrl(new Page(testCase[0], testCase[1]).getUrl());
new Wait(driver).forElementVisible(By.cssSelector(".side-nav-toggle-2016"));
this.pushMetaTagsToFile(out2);
Configuration.setTestValue("env", originalEnv);
}
}
out.close();
out2.close();
} catch (FileNotFoundException e) {
}
}
Aggregations