When testing for desktop apps, the login part is performed on the web. I got the login link but don’t know how to do the login part while on desktop testing.
Is there any way for me to do the above work?
Hi,
Thank you for sharing your concern. This is an interesting scenario, can you test by simulating Web Login? After getting login link, use Katalon Studio’s web testing capabilities to open the login URL in a separate browser window and perform the login steps using Katalon Studio’s web automation keywords like WebUI.sendKeys and WebUI.click to fill in credentials and submit the login. then switch back to Desktop App if possible.
Because the login link contains an accessToken that can only be created when clicking the Login button in the desktop app, there can be no login link if the desktop app has not been opened.
hi @cong11vn
since the token only exists after the desktop app opens the browser, you have to drive the browser the app opens, not one you open yourself. the trick is to make sure that browser is one katalon can attach to.
start chrome with a debugging port before the test (once, in a listener or a batch script):
chrome.exe --remote-debugging-port=9222 --user-data-dir=C:\katalon\chrome-profile
chrome is the default browser, so when the desktop app fires the login link it opens as a new tab in that same chrome instance. then attach katalon to it: in Project > Settings > Desired Capabilities > Chrome add debuggerAddress string localhost:9222, call WebUI.openBrowser(‘’) and switch to the tab with the login url (WebUI.switchToWindowUrl or by index). fill the form with the normal WebUI keywords, and once the app receives the token continue with the Windows keywords. the two drivers live side by side in the same test case, nothing special needed.
if you cannot set chrome as default on the test machine, the fallback is to automate the login page through the windows driver itself: chrome’s window is in the ui automation tree, so Windows.startApplicationWithTitle on the chrome window and setText on the edit controls works, it is just slower to locate objects.