Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
UFT doesn't recognize object in SAP at first, but recognize it after i click debug
#3
Not Solved
Hi,


Setting a wait statement didn't correct the bug.

For the hwnd, i copied the code you provided but it didn't worked. Maybe i didn't implement it correctly however. I'm not really sure.

Code:
    'Step1: Simulate your action to bring the popup window
    'Click on the OK button in Login window which will simulate the popup window.
    SystemUtil.Run "C:\Program Files (x86)\SAP\FrontEnd\SAPgui\saplogon.exe","","C:\Program Files (x86)\SAP\FrontEnd\SAPgui",""
    Dialog("SAP Logon 730").WinListView("SysListView32").Activate DataTable("Server", dtGlobalSheet)
    'Step 2: Get the HWND of the popup window (assuming that the popup window is the top most window)
    'Declare the extern
    extern.Declare micLong,"GetForegroundWindow","user32.dll","GetForegroundWindow"
    'Get the top most window hwnd
    hwnd = extern.GetForegroundWindow()
    'Step 3: Assign the HWND value to the Object in OR.
    'set the hwnd value in object repository
    SAPGuiSession("Session").SetTOProperty "hwnd",hwnd
    'Step 4: Continue working with popup window as usual
    'perform operation on the top most window objects.
    SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Client").Set DataTable("Client", dtGlobalSheet)
    SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("User").Set DataTable("User", dtGlobalSheet)
    SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Password").Set DataTable("Password", dtGlobalSheet)
    SAPGuiSession("Session").SAPGuiWindow("SAP").SAPGuiEdit("Logon Language").Set DataTable("Language", dtGlobalSheet)
    SAPGuiSession("Session").SAPGuiWindow("SAP").SendKey ENTER
Reply


Messages In This Thread
RE: UFT doesn't recognize object in SAP at first, but recognize it after i click debug - by CedricMab - 08-04-2016, 05:55 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Object doesn't support this property or method takecharge 1 1,555 11-13-2019, 10:05 PM
Last Post: stormbringer
  [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action sparkwanted 0 3,640 02-07-2017, 12:28 AM
Last Post: sparkwanted
  Object doesn't support this property or method: 'window(...).window(...).winobject' senthil5683 1 3,674 07-04-2016, 07:08 PM
Last Post: venkatesh9032
  UFT Mobile recognize MobileLabel knil45 3 3,392 05-31-2016, 05:20 PM
Last Post: vinod123
  How to click on all links dynamically in UFT? Rohan 9 18,466 02-25-2016, 10:42 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)