Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8795255
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T23:21:45+00:00 2026-06-13T23:21:45+00:00

I am looking at the selenium-webdriver API for .NET at http://selenium.googlecode.com/svn/trunk/docs/api/dotnet/index.html . For the

  • 0

I am looking at the selenium-webdriver API for .NET at http://selenium.googlecode.com/svn/trunk/docs/api/dotnet/index.html. For the arguments on IJavaScriptExecutor.ExecuteScript, it states that ‘For a number, a Int64 is returned’. What do I need to do if I want to pass a decimal (in/out) with this method? The Java bindings, for example, currently support both decimal and non-decimal types.

Any help is appreciated.

Thanks,
Vaibhav

Since I can’t answer my own question, I am editing the question.
I ran the following code to do test the argument types that can be passed to the ExcecuteScript method.

try
{
    IWebDriver driver = new InternetExplorerDriver();
        string script = "return arguments[0];";
    double d = 15.009;
    float f = 13.2f;
    decimal dec = 0.2m;
    int i = 8;
    object value = ((IJavaScriptExecutor)driver).ExecuteScript(script, new object[] { dec });
    driver.Close();
    driver.Quit();
}
catch(Exception ex)
{}

The above code throws an exception ‘Argument is of an illegal type 0.2 Parameter name: arg’. But the other values (double/float/int) can be passed and the return value is same as passed. The double should serve my purpose for now. I was worried that the webdriver would convert my double into Int64 when passed through that method. I think the documentation needs to be revised.

Thanks, Vaibhav

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T23:21:46+00:00Added an answer on June 13, 2026 at 11:21 pm

    So the solution would be to use float instead of decimal.

    Then cast float parameters to object and cast returned object to float.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to update to the latest revision of selenium code(http://selenium.googlecode.com/svn/trunk) daily. I just
We use SpecFlow with Selenium successfully to test our HTML applications and are looking
I'm studying the Selenium WebDriver wire protocol. I'm looking for an example situation in
I'm looking to execute a Selenium 2 test against the Nightly browser (FireFox 64bit).
I've been looking into setting up a Selenium test suite recently but all of
I looking into making a kind of robot testing browser. Like Selenium, but one
Looking at the Ehcahce implementation of net.sf.cache.JS107, I am trying to achieve the following
I am trying to understand testing framework better and been looking into Selenium. I've
I am using Selenium 2 (latest release from Googlecode) and I have it firing
I just started looking into selenium for automated testing for the past few days

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.