Home > Selenium > round off the decimal value to decimal places using Selenium IDE

round off the decimal value to decimal places using Selenium IDE

round off the decimal value to decimal places using Selenium IDE


Selenium.prototype.doRoundUp = function(elementOne, elementTwo)
 var val = elementOne.split(‘,’);
 var value = val[0];
 var digits = val[1];
 var numberRounded = (Math.round((value*Math.pow(10,digits)).toFixed(digits-1))/Math.pow(10,digits)).toFixed(digits);
 storedVars[ elementTwo ] = numberRounded;


Categories: Selenium Tags: ,
  1. May 7, 2013 at 2:23 pm

    Your style is really unique compared to other people I’ve read stuff from. Many thanks for posting when you’ve got
    the opportunity, Guess I will just bookmark this web site.

  2. May 25, 2013 at 4:50 am

    I was curious if you ever thought of changing the page layout of your blog?

    Its very well written; I love what youve got to say.

    But maybe you could a little more in the way of content so people
    could connect with it better. Youve got an awful lot of text for only having one
    or 2 pictures. Maybe you could space it out better?

  3. October 14, 2013 at 2:41 am

    Usually I don’t read post on blogs, but I wish to say that this
    write-up very compelled me to take a look at and do so!
    Your writing style has been amazed me. Thanks, very nice article.

  4. May 15, 2014 at 12:49 pm

    On the other hand, several of her Montreal Concordia University peers loved to wait to the last
    minute and loved the challenge. But every person is unique and each may have a different threshold
    of finding relief. If you’re moving by way of equivalent cases then
    you definitely are certainly experiencing panic attacks and also
    you need to look for ways on tips on how to discontinue and deal with anxiety.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: