How to map a SAP FileOpenDialog?

177 views Asked by At

I am using Silk4J 16 Hotfix 2 and I'm trying to automate a test. When pressing a button, a file open dialog appears and I need to specify a file to continue the test.

File Open Dialog in SAP

Unfortunately it is not possible to record locators for the object map using Locator Spy. I don't get the green rectangle around the dialog. The mouse cursor shows the hourglass cursor forever and the SAP activity indicator (not sure if that's the right name) is circulating forever.

When I close the dialog, everything returns to normal: the activity indicator stops, the hourglass turns into an arrow and the green rectangles appear.

To reproduce the issue, you can find such a dialog in this place:

  1. Go to /nSPRO
  2. Choose the glasses icon called SAP Reference IMG
  3. Go to Payroll
  4. Go to Payroll Germany
  5. Go to Social insurance
  6. Go to Recurring Adjustments
  7. Go to Annual Adjustments
  8. Select the clock icon with the green checkmark of Change HI Contribution Rates with Contribution Rate File
  9. In the following "Choose Activity" dialog, select the line Import Contribution Rate File
  10. Click Choose
  11. On the next page, click the stacked rectangle image behind Path of Update File.

This brings up a file selection dialog which has the same problems as mine. Note that in my particular case I don't have a text field like the one named "Path of Update file" and highlighted in yellow. I just have a button which opens the file selection dialog.

Choose Activity Dialog

Import Contribution File

I have tried:

  • I manually entered a series of //Window[x] locators where I increased the index x to see whether it will find the window
  • I did the same for //Dialog[x]

When I use Au3Info of AutoIt, it recognizes the dialog and the file name textbox. I get the following values for the textbox:

Class: Edit
Instance: 1
Name:
Advanced Mode: [CLASS:Edit; INSTANCE:1]

and some not so reliable coordinates. I tried to use this information in combination with a //TextField and //Control locator.

0

There are 0 answers