driver.get("https://www.appdirect.com/signup");WebElement emailAddress = driver.findElement(By.cssSelector("[name='emailAddress']"));String required = emailAddress.getAttribute("required");assertEquals(required, "true");
public boolean isTextPresent(String text){
try{
driver.findElement(By.xpath("//*[contains(.,'"+text+"')]"));
return true;
}catch (NoSuchElementException ne){
return false;
}
}
--
You received this message because you are subscribed to a topic in the Google Groups "webdriver" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/webdriver/FR8adSb5UsE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to webdriver+...@googlegroups.com.
To post to this group, send email to webd...@googlegroups.com.
Visit this group at https://groups.google.com/group/webdriver.
For more options, visit https://groups.google.com/d/optout.
"^[^@ ]+@[^@ ]+\.[^@ ]+$"
window.I18N['user.signup'] = 'Please enter an email address to begin';
WDS.sampleResult.sampleStart()WDS.browser.get('https://www.appdirect.com/signup?1935458167')var signupText = WDS.browser.executeScript('return I18N[\'user.signup\']')WDS.log.info('Text: ' + signupText)WDS.sampleResult.sampleEnd()driver.get("https://www.appdirect.com/signup?1452147832");
String signupText = driver.executeScript("return I18N['user.signup']").toString();
System.out.println(signupText);
Hi,
Can you please try to use the getAttribute("validationmessage") method on the email id field in which you can pass the attribute which you can see in the Firebug on the right hand side in DOM elements.
Regards,
Harshad
--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webdriver+...@googlegroups.com.