Guest User

Untitled

a guest
Apr 25th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public float getDecimalRandomNumber(){
  2. // create instance of Random class
  3. Random rand = new Random();
  4. // Generate and return Random number with decimal
  5. return rand.nextFloat();
  6. }
  7.  
  8. driver.findelement(by.id("text box").sendkeys(""+getDecimalRandomNumber());
  9.  
  10. public class Sample{
  11. private static float inputNumber= 1.1f;
  12.  
  13. public static float getInputNumber() {
  14. return inputNumber+ 0.1f;
  15. }
  16. }
Add Comment
Please, Sign In to add comment