Question

Control is not found in "Save As" window of web application

Hello,
I am trying to download a file several times using the same parameterized automation, at the beginning of the process the first file is downloaded (in the first iteration), but all the next iterations (using the same automation) the control that receives the file name for the "Save As" window is not found. I tried with WaitForCreate but still the component is not found, validating all the parents of this control I discovered that the control cmbComboBox father of txtTextBox is not recognized by the WaitForCreate so it does not find its son txtTextBox. screenshot attached, I'm using the Pega Robotics Studio v8.0.2038.0

Comments

Keep up to date on this post and subscribe to comments

Pega
September 11, 2019 - 9:20am

I assume you have performed the same process in interrogation mode to troubelshoot. If not, I would do that first. You might be able to identify a match rule that doesn't work for the second time that control gets created. If you haven't, or if it works in interrogation mode when you go through the process a second time, you'll need to examine the RuntimeLog.txt by enabling the FilePublisher. If you set All Categories to Verbose, you should get a detailed description of the matching process on each control. You should look for "| cmbComboBox" (pipe space control name without the quotation marks) in the log to locate all of the attempts at matching it. After the first run, look at all the messages where matching is failing and you might be able to determine which of your match rules does not work on the second iteration. You can also use a tool like Spy++ to get the window handle of the control that isn't matching and then searching the log for it to assist in determining why it didn't match.

September 11, 2019 - 3:25pm

this is what I found:

  1. ===> First iteration
  2.  
  3. Verbose | 01:52:51.029 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | IsMatch succeeded for rule ClassNameMatchRule - Target: HWND:00091B46
  4. Verbose | 01:52:51.032 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | IsMatch succeeded for rule ControlChildrenMatchRule - Target: HWND:00091B46
  5. Verbose | 01:52:51.033 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | IsMatch succeeded for rule BaseClassNameMatchRule - Target: HWND:00091B46
  6. Verbose | 01:52:51.034 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | IsMatch success - target: HWND:00091B46
  7. Verbose | 01:52:51.035 PM | 21 | STA | Keys | IncotelSearchSystem | cmbComboBox-40587096 | Attach - Current Instance - Adapter: IncotelSearchSystem, Control: cmbComboBox, Target: HWND:00091B46, Key:
  8. Verbose | 01:52:51.036 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | AttachTarget ComboBox (HWND:00091B46)
  9. ...
  10. Info | 01:52:51.055 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | Control is matched. Target: HWND:00091B46, ParentTarget: HWND:000A1D9A
  11. Verbose | 01:52:51.055 PM | 14 | STA | Windows Messages | IncotelSearchSystem | | Window.set_Text - SendMessage - HWND:00091ABA, msg: WM_SETTEXT, wParam: 0, lParam: D:\Reportes\inCotel\11-09-2019 13-52-18\BAQAME\AGENTS-BAQAME-A.xls
  12. Verbose | 01:52:51.056 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | MatchingService.Match(cmbComboBox,False) 26.9306
  13. ..
  14. Verbose | 01:52:51.349 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | ControlBase.Detach(destroyControl:True) - Target:HWND:00091B46, IsCreated:True
  15. Verbose | 01:52:51.350 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | DetachTarget ComboBox (HWND:00091B46)
  16. ..
  17. Info | 01:52:51.351 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | ControlBase.Detach(destroyControl:True) - Control is detached
  18. ...
  19.  
  20. ===> Second iteration
  21. Verbose | 01:53:25.444 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-40587096 | MatchingService.Match(cmbComboBox,False) 0
  22. ...
  23. Verbose | 01:54:26.188 PM | 1 | STA | Adapters | IncotelSearchSystem | cmbComboBox-40587096 | ControlBase.Detach(destroyControl:True) - Target:, IsCreated:False
  24. ...
  25. Verbose | 01:54:36.293 PM | 1 | STA | Adapters | | cmbComboBox-40587096 | Dispose - Destroyed Control

The full file is now attached.

Pega
September 12, 2019 - 9:07am

I don't see the cmbComboBox WaitForCreate timing out in this log. I'd like to see what happens then. Can you reproduce the issue and include that log?

September 12, 2019 - 5:09pm

For purpose of this log I remove the "wait for create" of all the controls, this is the new log with the same structure as the screenshot above

  1. Verbose | 03:02:27.287 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | IsMatch succeeded for rule ClassNameMatchRule - Target: HWND:00181A20
  2. Verbose | 03:02:27.289 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | IsMatch succeeded for rule ControlChildrenMatchRule - Target: HWND:00181A20
  3. Verbose | 03:02:27.291 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | IsMatch succeeded for rule BaseClassNameMatchRule - Target: HWND:00181A20
  4. Verbose | 03:02:27.291 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | IsMatch success - target: HWND:00181A20
  5. Verbose | 03:02:27.292 PM | 21 | STA | Keys | IncotelSearchSystem | cmbComboBox-8426113 | Attach - Current Instance - Adapter: IncotelSearchSystem, Control: cmbComboBox, Target: HWND:00181A20, Key:
  6. Verbose | 03:02:27.292 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | AttachTarget ComboBox (HWND:00181A20)
  7. ...
  8. Info | 03:02:27.304 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | Control is matched. Target: HWND:00181A20, ParentTarget: HWND:00051D3C
  9. Verbose | 03:02:27.305 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | MatchingService.Match(cmbComboBox,False) 17.9549
  10. ...
  11. Info | 03:02:27.324 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - ExecutionLink From: IncotelSearchSystem.Control2.WaitForCreate() To: IncotelSearchSystem.cmbComboBox.WaitForCreate() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  12. ...
  13. Info | 03:02:27.330 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - ExecutionLink From: IncotelSearchSystem.cmbComboBox.WaitForCreate() To: IncotelSearchSystem.txtTextBox.WaitForCreate() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  14. ...
  15. Verbose | 03:02:27.597 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | ControlBase.Detach(destroyControl:True) - Target:HWND:00181A20, IsCreated:True
  16. Verbose | 03:02:27.598 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | DetachTarget ComboBox (HWND:00181A20)
  17. ...
  18. Info | 03:02:27.600 PM | 21 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | ControlBase.Detach(destroyControl:True) - Control is detached
  19. ...
  20. Verbose | 03:02:32.405 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - Executed From: IncotelSearchSystem.cmbComboBox.WaitForCreate() To: IncotelSearchSystem.txtTextBox.WaitForCreate() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  21. ...
  22. Verbose | 03:02:32.406 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - Executed From: IncotelSearchSystem.Control2.WaitForCreate() To: IncotelSearchSystem.cmbComboBox.WaitForCreate() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  23. ...
  24. Verbose | 03:02:56.046 PM | 21 | STA | Matching | IncotelSearchSystem | cmbComboBox-8426113 | MatchingService.Match(cmbComboBox,False) 0
  25. ...
  26. Info | 03:02:56.056 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - ExecutionLink From: IncotelSearchSystem.Control2.WaitForCreate() To: IncotelSearchSystem.cmbComboBox.WaitForCreate() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  27. ...
  28. Info | 03:03:26.072 PM | 14 | STA | Automation | DownloadReport | IncotelReports | Automation: DownloadReport - ExecutionLink From: IncotelSearchSystem.cmbComboBox.WaitForCreate() To: DownloadReport.messageDialog1.Show() ID: 384c8b22-8bee-49c0-8fce-1716f2c58ef5
  29. ...
  30. Verbose | 03:03:46.181 PM | 1 | STA | Adapters | IncotelSearchSystem | cmbComboBox-8426113 | ControlBase.Detach(destroyControl:True) - Target:, IsCreated:False
  31. ...
  32. Verbose | 03:03:56.271 PM | 1 | STA | Adapters | | cmbComboBox-8426113 | Dispose - Destroyed Control

 

Pega
September 12, 2019 - 6:19pm
Response to yahird84

There's really nothing telling in here. I would suggest you try a Rematch after your first iteration. If that doesn't work, you might need someone with access to your machine to assist you.

Are you able to reproduce the issue in interrogation?

September 13, 2019 - 9:41am

I already tried check the match rules in the interrogation doing the process twice, I cannot re-create this issue, should I create a ticket?

Pega
September 13, 2019 - 12:34pm
Response to yahird84

If you are unable to figure this out, then I would suggest that you open a support request. If you do, please post the request number here so we can update the post with the resolution.