Commit 23be615c83b9b56b0dfa9f4b9cb348a8da4a5d41
1 parent
7240d474
修改采购商注册页面的元素定位
Showing
2 changed files
with
48 additions
and
17 deletions
Show diff stats
src/main/java/com/buyer/pageObject/RegisterPage.java
@@ -60,15 +60,15 @@ public class RegisterPage extends BasePage { | @@ -60,15 +60,15 @@ public class RegisterPage extends BasePage { | ||
60 | WebElement continentPlaceholder; | 60 | WebElement continentPlaceholder; |
61 | 61 | ||
62 | //欧洲europe | 62 | //欧洲europe |
63 | - @FindBy (xpath="//*[text()='Europe']") | 63 | + @FindBy (xpath="//div[contains(text(),'Eastern Europe')]") |
64 | WebElement Europe; | 64 | WebElement Europe; |
65 | 65 | ||
66 | //country | 66 | //country |
67 | - @FindBy (xpath ="//*[@id='countryPlaceholder']") | 67 | + @FindBy (xpath ="//div[@id='countryPlaceholder']") |
68 | WebElement country; | 68 | WebElement country; |
69 | 69 | ||
70 | //俄罗斯Russian | 70 | //俄罗斯Russian |
71 | - @FindBy (xpath ="//*[text()='Russian federation']") | 71 | + @FindBy (xpath ="//div[contains(text(),'Russian federation')]") |
72 | WebElement Russian; | 72 | WebElement Russian; |
73 | 73 | ||
74 | //contactName | 74 | //contactName |
@@ -122,7 +122,31 @@ public class RegisterPage extends BasePage { | @@ -122,7 +122,31 @@ public class RegisterPage extends BasePage { | ||
122 | //Register | 122 | //Register |
123 | @FindBy (xpath ="//*[@id='submit']") | 123 | @FindBy (xpath ="//*[@id='submit']") |
124 | WebElement register; | 124 | WebElement register; |
125 | - | 125 | + |
126 | + //Main Way to Deliver | ||
127 | + @FindBy(xpath = "//div[@id='currDeliveryType']") | ||
128 | + WebElement currDeliveryType; | ||
129 | + | ||
130 | + //deliveryMode | ||
131 | + @FindBy(xpath = "//li[contains(text(),'Whole container')]") | ||
132 | + WebElement containerMode; | ||
133 | + | ||
134 | + //businessLicenceNO | ||
135 | + @FindBy(xpath = "//input[@id='businessLicenceNO']") | ||
136 | + WebElement businessLicenceNO; | ||
137 | + | ||
138 | + //taxRegistrationNO | ||
139 | + @FindBy(xpath = "//input[@id='taxRegistrationNO']") | ||
140 | + WebElement taxRegistrationNO; | ||
141 | + | ||
142 | + //choosePurchaseType | ||
143 | + @FindBy(xpath = "//div[contains(@class,'btn btn-info btn-xz')]") | ||
144 | + WebElement choosePurchaseType; | ||
145 | + | ||
146 | + //allToys | ||
147 | + @FindBy(xpath = "//em[contains(text(),'All Products')]") | ||
148 | + WebElement allToys; | ||
149 | + | ||
126 | /* | 150 | /* |
127 | * 页面方法 | 151 | * 页面方法 |
128 | */ | 152 | */ |
@@ -140,22 +164,29 @@ public class RegisterPage extends BasePage { | @@ -140,22 +164,29 @@ public class RegisterPage extends BasePage { | ||
140 | click(CNY); | 164 | click(CNY); |
141 | sendKeys(companyName, "Auto"+num); | 165 | sendKeys(companyName, "Auto"+num); |
142 | click(continentPlaceholder); | 166 | click(continentPlaceholder); |
143 | - click(Europe); | ||
144 | - click(Russian); | ||
145 | sendKeys(contactName, "Tester"+num); | 167 | sendKeys(contactName, "Tester"+num); |
146 | - sendKeys(phone, format.format(new Date())); | 168 | + click(currDeliveryType); |
169 | + click(containerMode); | ||
147 | forceWait(500); | 170 | forceWait(500); |
148 | - click(purchaseQuantity); | ||
149 | - click(quantity); | ||
150 | - forceWait(500); | ||
151 | - click(singleQuantity); | ||
152 | - click(single); | 171 | + click(Europe); |
172 | + click(Russian); | ||
173 | +// sendKeys(phone, format.format(new Date())); | ||
174 | +// click(purchaseQuantity); | ||
175 | +// click(quantity); | ||
176 | +// forceWait(500); | ||
177 | +// click(singleQuantity); | ||
178 | +// click(single); | ||
153 | moveHeightScroll("100"); | 179 | moveHeightScroll("100"); |
180 | +// jsExecutorClick(select); | ||
181 | +// click(toys1); | ||
182 | +// click(toys2); | ||
183 | +// click(toys3); | ||
184 | + click(choosePurchaseType); | ||
154 | jsExecutorClick(select); | 185 | jsExecutorClick(select); |
155 | - click(toys1); | ||
156 | - click(toys2); | ||
157 | - click(toys3); | 186 | + click(allToys); |
158 | click(blank); | 187 | click(blank); |
188 | + sendKeys(businessLicenceNO,"12345678"); | ||
189 | + sendKeys(taxRegistrationNO,"987654321"); | ||
159 | sendKeys(referralCode, Model.getInvateCode()); | 190 | sendKeys(referralCode, Model.getInvateCode()); |
160 | jsExecutorClick(checkbox); | 191 | jsExecutorClick(checkbox); |
161 | click(register); | 192 | click(register); |
src/main/resources/data.xml
@@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
2 | <test> | 2 | <test> |
3 | <data> | 3 | <data> |
4 | <!-- <buyerAccount>buyer11159@essa.cn</buyerAccount> --> | 4 | <!-- <buyerAccount>buyer11159@essa.cn</buyerAccount> --> |
5 | - <buyerAccount>meng18@essa.cn</buyerAccount> | ||
6 | - <supplier>物料分析</supplier> | 5 | + <buyerAccount>monkey@163.com</buyerAccount> |
6 | + <supplier>kabuto</supplier> | ||
7 | <buyerNo>COK09161</buyerNo> | 7 | <buyerNo>COK09161</buyerNo> |
8 | </data> | 8 | </data> |
9 | </test> | 9 | </test> |