Solved

TBox Dialog

  • 5 April 2024
  • 6 replies
  • 47 views

Badge

Hi,

I am using TBox Dialog to steer a Windows dialog box that worked fine and suddenly doesn’t work, says Button can’t be found. Nothing has changed on the Dialog Box, it is still the same caption, label and button. Can’t think of any reason why it suddenly says “The button with text 'Yes' was not found!”?

icon

Best answer by brendon.russell 7 April 2024, 22:05

View original

6 replies

Userlevel 1

A couple of checks to start with:

  1. Scan the dialog box using xscan and see if it reads all the properties as expected, including title of the dialog box, and the button labels
  2. The dialog box may not be in focus. Try to bring it to focus using Tbox windows operation module, and then try to click the button
Badge

Hi, thanks for your reply.

 

Regarding 1, I can’t find a way to rescan it. But I guess that is an expected behaviour for a standard module? Scanning also doesn’t work.

Regarding 2, tried that, but made no difference.

The thing is, it worked with no issues and it suddenly stopped working for no apparent reason.

Userlevel 3
Badge +1

Hi,

I am using TBox Dialog to steer a Windows dialog box that worked fine and suddenly doesn’t work, says Button can’t be found. Nothing has changed on the Dialog Box, it is still the same caption, label and button. Can’t think of any reason why it suddenly says “The button with text 'Yes' was not found!”?

I’ve found the TBox Save As to be unreliable like this, so I suspect TBox Dialog is the same way.

I would just scan the dialog (with the UIA engine) and use that module instead.

Userlevel 1

Hi,

I am using TBox Dialog to steer a Windows dialog box that worked fine and suddenly doesn’t work, says Button can’t be found. Nothing has changed on the Dialog Box, it is still the same caption, label and button. Can’t think of any reason why it suddenly says “The button with text 'Yes' was not found!”?

I’ve found the TBox Save As to be unreliable like this, so I suspect TBox Dialog is the same way.

I would just scan the dialog (with the UIA engine) and use that module instead.

Same here. I have noticed that TBox Save As is much slower than the module that I scanned for the same purpose. So I just use my own scanned one

Userlevel 1

Hi, thanks for your reply.

 

Regarding 1, I can’t find a way to rescan it. But I guess that is an expected behaviour for a standard module? Scanning also doesn’t work.

Regarding 2, tried that, but made no difference.

The thing is, it worked with no issues and it suddenly stopped working for no apparent reason.

Regarding 1, not a rescan. Just do a fresh scan of the windows dialog. Using this new scan you can what properties and values is Tosca reading from the Dialog Box, and compare it with the properties and values that you are using in your existing test step.

Badge

I scanned using UIA and it worked and I thought that was the solution. Now it stopped working again suddenly and it says “Could not find Button 'Yes' with the following properties:
- AutomationId: CommandButton_6
- Name: Yes”

As I can’t see the properties of a windows dialog box, I assume something about the properties changes regularly, perhaps caused by the system, which causes Tosca not to recognise the windows dialog box anymore after 2 - 3 days?

 
 

 

 

Reply