From 23be615c83b9b56b0dfa9f4b9cb348a8da4a5d41 Mon Sep 17 00:00:00 2001 From: huangzhizhen Date: Sun, 28 Apr 2019 17:08:43 +0800 Subject: [PATCH] 修改采购商注册页面的元素定位 --- src/main/java/com/buyer/pageObject/RegisterPage.java | 61 ++++++++++++++++++++++++++++++++++++++++++++++--------------- src/main/resources/data.xml | 4 ++-- 2 files changed, 48 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/buyer/pageObject/RegisterPage.java b/src/main/java/com/buyer/pageObject/RegisterPage.java index b99b48a..704cc1d 100644 --- a/src/main/java/com/buyer/pageObject/RegisterPage.java +++ b/src/main/java/com/buyer/pageObject/RegisterPage.java @@ -60,15 +60,15 @@ public class RegisterPage extends BasePage { WebElement continentPlaceholder; //欧洲europe - @FindBy (xpath="//*[text()='Europe']") + @FindBy (xpath="//div[contains(text(),'Eastern Europe')]") WebElement Europe; //country - @FindBy (xpath ="//*[@id='countryPlaceholder']") + @FindBy (xpath ="//div[@id='countryPlaceholder']") WebElement country; //俄罗斯Russian - @FindBy (xpath ="//*[text()='Russian federation']") + @FindBy (xpath ="//div[contains(text(),'Russian federation')]") WebElement Russian; //contactName @@ -122,7 +122,31 @@ public class RegisterPage extends BasePage { //Register @FindBy (xpath ="//*[@id='submit']") WebElement register; - + + //Main Way to Deliver + @FindBy(xpath = "//div[@id='currDeliveryType']") + WebElement currDeliveryType; + + //deliveryMode + @FindBy(xpath = "//li[contains(text(),'Whole container')]") + WebElement containerMode; + + //businessLicenceNO + @FindBy(xpath = "//input[@id='businessLicenceNO']") + WebElement businessLicenceNO; + + //taxRegistrationNO + @FindBy(xpath = "//input[@id='taxRegistrationNO']") + WebElement taxRegistrationNO; + + //choosePurchaseType + @FindBy(xpath = "//div[contains(@class,'btn btn-info btn-xz')]") + WebElement choosePurchaseType; + + //allToys + @FindBy(xpath = "//em[contains(text(),'All Products')]") + WebElement allToys; + /* * 页面方法 */ @@ -140,22 +164,29 @@ public class RegisterPage extends BasePage { click(CNY); sendKeys(companyName, "Auto"+num); click(continentPlaceholder); - click(Europe); - click(Russian); sendKeys(contactName, "Tester"+num); - sendKeys(phone, format.format(new Date())); + click(currDeliveryType); + click(containerMode); forceWait(500); - click(purchaseQuantity); - click(quantity); - forceWait(500); - click(singleQuantity); - click(single); + click(Europe); + click(Russian); +// sendKeys(phone, format.format(new Date())); +// click(purchaseQuantity); +// click(quantity); +// forceWait(500); +// click(singleQuantity); +// click(single); moveHeightScroll("100"); +// jsExecutorClick(select); +// click(toys1); +// click(toys2); +// click(toys3); + click(choosePurchaseType); jsExecutorClick(select); - click(toys1); - click(toys2); - click(toys3); + click(allToys); click(blank); + sendKeys(businessLicenceNO,"12345678"); + sendKeys(taxRegistrationNO,"987654321"); sendKeys(referralCode, Model.getInvateCode()); jsExecutorClick(checkbox); click(register); diff --git a/src/main/resources/data.xml b/src/main/resources/data.xml index 4b8e61c..6934e6b 100644 --- a/src/main/resources/data.xml +++ b/src/main/resources/data.xml @@ -2,8 +2,8 @@ - meng18@essa.cn - 物料分析 + monkey@163.com + kabuto COK09161 -- libgit2 0.21.2