EditBOMPage.java
1.87 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
package com.essa.pageObject.productDev;
import com.essa.framework.BasePage;
import com.essa.framework.Model;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
/**
* @Description: BOM修改页面
* @Author: ZengJin
* @CreateTime: 2018/10/29
*/
public class EditBOMPage extends BasePage {
/**
* 构造方法
*
* @param driver
*/
public EditBOMPage(WebDriver driver) {
super(driver);
}
/**
* 元素定位
*/
@FindBy (xpath = "//*[@ng-click='materialChoose()']")
WebElement matChoose;//物料选取
@FindBy (xpath = "//*[@name='keyword']")
WebElement keyword;//关键字查询
@FindBy (xpath = "//*[@name='keyword']/../span/button")
WebElement search;//查询按钮
@FindBy (xpath = "//*[@ng-click='materialSelected(item)']")
WebElement checkbox;//复选框
@FindBy (xpath = "//*[contains(text(),'选定')]")
WebElement selectedConfirm;//选定
@FindBy (xpath = "//*[text()='设置']")
WebElement set;//集单物料:设置
@FindBy (xpath = "//*[@ng-click='selectBulkMat(item)']")
WebElement selectBulkMat;//待选择的物料
@FindBy (xpath = "//*[@ng-click='save()']")
WebElement save;//确定修改
/**
* 页面方法
*/
/**
*编辑BOM,设置集单物料等
* @param
* @return 项目立项书列表
*/
public ProjectListPage editBom(){
mywait(matChoose);
click(matChoose);
forceWait(500);
sendKeys(keyword, Model.getMaterialName());
click(search);
forceWait(1000);
click(checkbox);
click(selectedConfirm);
forceWait(500);
click(set);
click(selectBulkMat);
click(selectedConfirm);
forceWait(500);
click(save);
return new ProjectListPage(driver);
}
}