Forum Discussion

BillA603's avatar
BillA603
Contributor
4 years ago
Solved

Window is invisible error after migration to PowerBuilder 2017 R3 built Windows application

I have a Windows Application that was developed with PowerBuilder 2017 Release 2. I created a number of Data-Driven TestComplete scripts for regression testing. Recently, we upgraded PowerBuilder to PB 2017 Release 3 and rebuilt the application. Pretty much all of the Name Mapping IDs changed.

I created a new TestComplete Project and I have re-recorded a few scripts (with the PB2017 R3 application). The Name Mapping shows the new IDs. The newly created test scripts play back fine.

 

Next, I pasted the original Data Driven script into my new project and updated the object IDs in the script to reflect the new name mapping IDs. When I run the Data Driven script, it fails on the first Date/Time edit box with Window is not visible error. I use the Object Spy and it is not locating the Date/Time control. It only identifies the parent screen. But if I go back and play back the recently recorded script, the entry of the date and time in the Date/Time control works fine.

 

One thing that I noticed when comparing the original Data-Driven script (from PB 2017 R2) to the newly recorded script (PB 2017 R3) is that the original script did not specify an object ID for the Date/Time control. Here are the 2 lines of script to illustrate what I mean.

Original PB 2017 R2 script to enter Date and Time:

Call Aliases.options.wndFNWND3126.MDIClient.wndFNWND3126.pbdw126.Keys(sRptDate + "1115a" + sTab)

Newly recorded PB 2017 R3 script to enter Date and Time:

Call Aliases.options.wndFNWND3170.MDIClient.wndFNWND3170.pbdw170.PBEDIT170.Keys("020320201015a[Tab]")

NOTE: The newly recorded script just sets the Date /time to 02/03/2020 1015 AM without referencing the Data-Driven variables. the key thing I want to point out here is the new script added the PBEDIT170 object ID which according to the Name Mapping is the Date/Time control. With the old script, there was no ID specific to the Date/Time control.

For testing purposes, I just put the new script line in my data driven script (without using the data driven variable for the date) simply using a hard-coded value of 02/02/2020 1015 AM instead.

Call Aliases.options.wndFNWND3170.MDIClient.wndFNWND3170.pbdw170.PBEDIT170.Keys("020320201015a[Tab]")

I figure I can update the data driven script to use the variable once the Date/Time control gets recognized.

 

Here is a screen shop of the Name Mapping showing the Date/Time control.

 

 

Am I missing something here?

I appreciate any assistance that can be provided.

 

 

Thanks,

Bill

2 Replies