27d9a429
suweicheng
开发梳理;
|
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
|
package com.essa.pageObject.StorageManage;
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;
import com.essa.framework.Model;
/**
* 收货任务管理页面
* @author Administrator
*
*/
public class GoodsReceiveTaskPage extends BasePage {
public GoodsReceiveTaskPage(WebDriver driver) {
super(driver);
}
/*
* 元素定位
*/
@FindBy (xpath = "//*[@name='selectKey']")
WebElement keyword;//关键字查询
@FindBy (xpath = "//button[contains(@ng-click,'search')]")
WebElement search;//查询按钮
@FindBy (xpath = "//tbody/tr[1]")
WebElement firstResult;//列表第一个结果
@FindBy (xpath = "//button[contains(text(),'处理')]")
WebElement deal;//处理
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
36
37
38
|
@FindBy (xpath = "//tbody//tr[1]/td[8]")
WebElement status;//第一个结果的状态
|
27d9a429
suweicheng
开发梳理;
|
39
40
41
42
43
44
45
46
47
|
/*
* 页面方法
*/
/**
* 选择第一个筛选结果,点击处理
* @return PO收货任务处理页
*/
public GoodsReceiveTaskPage dealReceive() {
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
48
49
|
forceWait(1000);
dynamicWait(By.xpath("//tbody//tr[1]"));
|
27d9a429
suweicheng
开发梳理;
|
50
51
|
sendKeys(keyword, Model.getPoNum());
click(search);
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
52
|
dynamicLoad();
|
27d9a429
suweicheng
开发梳理;
|
53
54
55
56
|
click(firstResult);
click(deal);
return new GoodsReceiveTaskPage(driver);
}
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
57
58
59
60
61
62
63
|
/**
*判断是否全部收货完成:true完成,false未完成
* @param
* @return boolean
*/
public boolean isFinish(){
forceWait(500);
|
1458ba60
zengjin
组装用例
|
64
65
|
boolean b = isVisibility(By.xpath("//*[text()='完成']"));
return b;
|
d7f15c1c
zengjin
提交并且覆盖之前的
|
66
|
}
|
27d9a429
suweicheng
开发梳理;
|
67
|
}
|