1
我計劃使用Array來測試Gmail登錄。您可能已經注意到,Gmail登錄首次驗證用戶名。我要聲明,我想保持數組變量使用Java在Selenium WebDriver中實現數組
{ 「#[email protected]」, 「[email protected]」, 「[email protected]」}
我很困惑的一些事情是如何一次發送1個名稱並驗證它。
例子:
f.findElement(By.id("EMail")).sendKeys("[email protected]");
//code below to get sendKeys value
WebElement w= f.findElement(By.id("Email"));
String emailID= w.getAttribute("value");
System.out.println("Email id used " + emailID);
if((emailID).contains(" # $")){
System.out.println("Invalid character");
}
混亂:如何實現一次發送1名和驗證無效字符和它匹配時[email protected]然後打印正確的電子郵件地址?