Menu IsEnabled() not working properly

General discussion about the Phantom Automation Language and related tools.

Menu IsEnabled() not working properly

Postby CashCow on Wed Jul 04, 2012 9:42 am

Not sure if anyone actually reads this anymore but I am having a bug here with a menu item which is not correctly identifying its enabled status.

By the way I am sure that it works fine in PhantomTarget but here the only disabled item under Menu -> disabled is always disabled and never changes its status, whilst all the other menu items are always enabled and never change.

In my example I have a tree view in a modeless (as they should be) MDI client and a particular item is enabled or disabled dependent on which tree item is selected. If no item is selected then it is disabled.

In my exact example, it should be disabled for the first item in the tree. I then navigate down the tree using the <DOWN> arrow. Aside from the first item it should be enabled for all the later items. (Just based on what is actually on my tree in this example).

It appears to be random as to whether it correctly gets the first item right - sometimes says it is enabled and sometimes disabled.

If it says enabled it will fail the test when it tries to select the menu item and the dialog never appears.
If it says disabled it will move onto the next item but now always comes up as disabled (for all the items on the tree) and just goes all the way down the tree never finding an enabled item.

By the way, this functionality works perfectly on my app. It is Phantom that fails to detect correctly. Plus no matter what I do I can't get it to show the menu - TypeKeys("<Alt-j>") on several windows with a Sleep after it - Select() on the top menu item... None of these get the menu to appear on the screen.
Posts: 5
Joined: Wed Jul 04, 2012 9:07 am

Return to Phantom

Who is online

Users browsing this forum: No registered users and 1 guest