Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

python pyautogui automate SAP Log On : Failed to do Injection.

usertest-123
Member
0 Likes
1,327
  • SAP Log on - Able to run the app (via Public path = C:\Users\Public\Desktop\SAP Logon.lnk) and the key function "tab" was working but the injection of credential is missing. However, the tab isn't working as intended too. In the code, the tab is defined as a single count,but during the testing, the tab is moving twice in the app. Hence, failed to select the intended area.
  • Another challenge that we had found today, the SAP Logon does not load any data via public path. Hence, the SAP Logon data is empty.
  • However, if the SAP Logon is accessed via (profile path eg. pwsuser) , the SAP Logon showed some data.


    #Variablesdir = sys.argv[1]username = sys.argv[2]password = sys.argv[3]x = dir.split("\\")print(x[-1])command = "cd \ && cd Users/Public/Desktop && " + '"' + x[-1] + '"'print(command)print(username)print(password)os.system(command)time.sleep(20)
    #Commandpyautogui.press('tab') pyautogui.press('enter') time.sleep(3)pyautogui.typewrite(username)pyautogui.press('tab') time.sleep(3)pyautogui.typewrite(password)pyautogui.press('enter')
    print('DONE')

Sorry guys, Im a newbie to this field. Hence, seek some helps to those who might actually know to approach this problem. Thanks.

1 REPLY 1
Read only

Former Member
0 Likes
1,085

Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with: https://community.sap.com/resources/questions-and-answers, as the overview provides tips for preparing questions that draw responses from our members.

Should you wish, you can revise your question by selecting Actions, then Edit.

By adding a picture to your profile you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.

Questions on how to draw responses from members? Check out this discussion on how to improve questions. https://groups.community.sap.com/t5/welcome-corner-discussions/advice-from-sap-champions-questions-a...