Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exist and ChildObjects
#1
Not Solved
Hello,

I've got a problem when I try to use the "Exist" method on an object that I get thanks to ChildObjects.

For example :

Code:
Set odesc = Description.Create
odesc("Class Name").Value = "JavaTable"

Set a = JavaWindow("Index:=2").ChildObjects(odesc)

msgbox a.count          'Display "3"

a(0).highlight          'Works fine
msgbox a(0).Exist       'Display "False"
a(0).highlight          'Throw a general run error


I don't understand why the Exist method doesn't work.
Question 1 : How can I use the Exist method in this case ?


I tried to use "micClass" instead of "Class Name" but the JavaTables are not detected.

Code:
Set odesc = Description.Create
odesc("micClass").Value = "JavaTable"

Set a = JavaWindow("Index:=2").ChildObjects(odesc)

msgbox a.count          'Display "0"

Question 2 : Do you know why the "micClass" property doesn't match any of the 3 JavaTables in my window ?



Thanks in advance !
Reply
#2
Not Solved
HI SAKDOSS,

Please find the below example for an "WebTable" & its working fine for me.

Example:
Code:
Set obj=Description.Create
obj("micclass").Value="WebTable"
Set x=browser("Gmail...").Page("Gmail..").Frame("cu4idgi98gudv").ChildObjects(obj)

       msgbox x.count      ' displayed 1
       x(0).highlight         ' this worked fine

       msgbox x(0).Exist    ' displayed True
       msgbox x(0).GetROProperty("Visible")  'displayed True

       x(0).highlight         ' again worked fine

So explore from ur side for ur Java Appl & i hope you can solve it.
Reply
#3
Not Solved
Ok.

I still don't understand why the micclass doesn't match any JavaTable but instead of "Exist(0)" I will use "GetROProperty("displayed")".

Thank you for the example !
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Exist and Visible Are True When Objects Aren't There - Is there A Better Way? zunebuggy 3 3,143 04-24-2018, 02:12 PM
Last Post: Ankur
  Time Delay issue with Exist mv8167 11 24,798 06-19-2017, 02:56 PM
Last Post: grosorg
  Performance Issues Using '.Exist' AndyBSG 2 3,492 12-12-2014, 03:24 PM
Last Post: AndyBSG
  datatable column exist diya 3 12,533 12-11-2012, 11:24 AM
Last Post: elango87
  Check if exist not selected radiobutton sedin 6 7,766 09-12-2012, 12:55 PM
Last Post: sedin

Forum Jump:


Users browsing this thread: 1 Guest(s)