Rukavishnikova #14
@ -1,16 +1,15 @@
|
|||||||
package ru.oriflame.pages;
|
package ru.oriflame.pages;
|
||||||
|
|
||||||
|
import org.openqa.selenium.By;
|
||||||
import org.openqa.selenium.WebDriver;
|
import org.openqa.selenium.WebDriver;
|
||||||
import org.openqa.selenium.WebElement;
|
import org.openqa.selenium.WebElement;
|
||||||
import org.openqa.selenium.support.FindBy;
|
import org.openqa.selenium.support.FindBy;
|
||||||
import org.openqa.selenium.support.PageFactory;
|
|
||||||
|
|
||||||
public class ChangeLanguages {
|
public class ChangeLanguages {
|
||||||
|
|
||||||
public WebDriver driver;
|
public WebDriver driver;
|
||||||
|
|
||||||
public ChangeLanguages(WebDriver driver) {
|
public ChangeLanguages(WebDriver driver) {
|
||||||
PageFactory.initElements(driver, this);
|
|
||||||
this.driver = driver;
|
this.driver = driver;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -27,4 +26,20 @@ public class ChangeLanguages {
|
|||||||
public void chinaLinking() {
|
public void chinaLinking() {
|
||||||
chinaLink.click();
|
chinaLink.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean assertChangelanguag() {
|
||||||
|
try {
|
||||||
|
Thread.sleep(15000);
|
||||||
|
} catch (InterruptedException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return driver.findElement(By.cssSelector("body > header > div > div.ui-sticky-bar.js-sticky-bar > div.w-sticky-bar-list.clearfix > ul > li.catalogue.left.only-for-desktop-size > a")).getText().indexOf("产品目录") >= 0;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user