Forum Discussion

mesg2anil's avatar
mesg2anil
Regular Contributor
14 years ago

If Syntax Issue

Hi,



I'm using below code to check if the txtamount is greater than 0 then I will pass the condition, but "if" line itself is erroring out




Set iexplore = Sys.Process("iexplore", 2).Page("http://qaserver/Default.asp").document.frames.Frame("mainFrame").document.frames.Frame("ContentFrame").document.all


iexplore = .Process("iexplore", 2).Page("http://qaserver/Default.asp").document.frames.Frame("mainFrame").document.frames.Frame("ContentFrame").document.all

If iexplore.Item("txtAmount") > 0 Then   ==>>  Error out as 'Object doesn't support this property or method



Item("txtAmount")  is an object of which I am checking the value, if the value is greater than 0 or not. What is the correct syntax?

Please suggest

  • Hi,



    'Item("something")' is an object which you cannot compare with numbers. Use some of its properties which hold the value you need to check (such as innerText).