Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. <div id="req8">
  2. <h2>Test #8</h2>
  3. <input id="req8input" type="text" value="Type Number Here">
  4. </div>
  5.  
  6. String value=""1000000.00""
  7. DecimalFormat myFormatter = new DecimalFormat("###,###.##");
  8. String output = myFormatter.format(value);
  9. WebElement webElement= driver.findElement(By.ById("req8input"));
  10. webElement.sendKeys("100);
  11. assertEquals(output, webElement.getAttribute("value"));
  12.  
  13. WebElement el = driver.findElement(By.id("req8input"));
  14.  
  15. el.sendKeys("1000000");
  16.  
  17. String val = el.getAttribute("value");
  18.  
  19. assertEquals("$1,000,000.00", val);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement