PODocumentaryListPage.java
1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
package com.essa.pageObject.PODocumentary;
import com.essa.framework.Model;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import com.essa.framework.BasePage;
/**
* @author Administrator
*PO跟单任务列表页面
*/
public class PODocumentaryListPage extends BasePage {
public PODocumentaryListPage(WebDriver driver) {
super(driver);
}
/*
* 元素定位
*/
@FindBy (xpath = "//*[contains(text(),'高级查询')]")
WebElement advancedQuery;//高级查询
@FindBy (xpath = "//*[text()='PO单号:']/../div[1]/input")
WebElement OrderNo;//PO单号
@FindBy (xpath = "//*[text()='查询']")
WebElement search;//查询按钮
@FindBy (xpath = "//*[@id='listView']/div/table/tbody/tr[1]/td/div/div[1]/div/ul/li[1]/a")
WebElement detail;//搜索结果中的一个查看详情
/*
* 页面方法
*/
public POBoardPage todetail() {
mywait(detail);
click(advancedQuery);
sendKeys(OrderNo, Model.getPoNum());
click(search);
dynamicLoad(By.xpath("//*[style='display: block;']"));
click(detail);
return new POBoardPage(driver);
}
}