Forum Discussion

Arunachalam's avatar
Arunachalam
Occasional Contributor
5 years ago

How to Find the value in a specified object

Hi,

 

I m unable to get the value that has been available in a specified field, it is a numerical value which is present during the run time.

Is there any ways to find the return type of an object or variable.

5 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    I'm not sure I understand the question.  You're having problems finding the value of a property of an object (probably wText or something like that, I'm assuming), is that correct?  If you're having problems finding that value, how will returning the object type help?

     

    Can you share your code?  What error messages are you experiencing? What script language are you using?

    • Arunachalam's avatar
      Arunachalam
      Occasional Contributor

      else if(ProjectSuite.Variables.Type == "checkpoint1")

      {

      var value1= aqObject.GetPropertyValue(Sys.Browser(ProjectSuite.Variables.browser).

      Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText");

      var value5 = aqConvert.StrToInt(value1);

      Log.Message(value5);

      }

      else if(ProjectSuite.Variables.Type == "checkpoint2")

      {

      var value2 = aqObject.GetPropertyValue(Sys.Browser(ProjectSuite.Variables.browser).

      Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText");

      var value6 = aqConvert.StrToInt(value2);

      Log.Message(value6);

      var vaule3 = value5 * value6;

      Log.Message(vaule3);

      }

      else if(ProjectSuite.Variables.Type == "checkpoint")

      { aqObject.CheckProperty(Sys.Browser(ProjectSuite.Variables.browser).Page(ProjectSuite.Variables.Page).document.frames.Frame("ilboinnerframe").document.all.Item(ProjectSuite.Variables.Item),"innerText", cmpEqual,vaule3);

      Message.Message(); // calling the message function

      }

       

       

      Hi,

      In the above code, The var value3 return only Nan(not a Number) value after the multiplication is done and I m unable to get the actual output value in var value3 so, I can't proceed with property checkpoint line.