You can, yes. But I think some explanation is in order.
AHK hooks into the windows subsytem to monitor keyboard and mouse operation. When it receives a specific key or set of keys or a string it recognizes, it executes a predefined operation. IOW, it’s a macro system.
Aside: My description makes AHK sound like a simplistic macro player. Not true. It’s *much more than that. It’s quite complex and extremely powerful in the right hands.
The problems I see are:
It’s a lot to learn to solve the OP’s problem.
AHK “just sits there waiting”. It’s not designed to be “called” like other subsystems/programs.
If we assume you have managed to start AHK from Groovy code, you would then need to trigger the right keys in Groovy which target the browser to trigger the right macro in AHK (because it’s waiting for those keys).
Sounds messy.
I’m not saying it won’t work. Just sounds tricky - and there are too many moving parts.
Hi @kazurayam and @Russ_Thomas, Thanks for your guidance.
Actually my client doesn’t support installing other softwares except Katalon which i’m currently using for Test Automation. So i have been searching for the solution for the past few days and got it from the below source.
I’m able to to run chrome as different user using java code but as you see from the above source there is no driver initialization or such. So could you please let me know if there is any way as how to tell Katalon to use the browser opened by the Java code.
I am sorry to say but I still do not understand your problem. Could you please take screenshots of the following procedure you mentioned, step-by-step?
I would need screenshots of all the following steps:
you “ran as different user on Chrome” ---- screenshot 1
“logged in using profile with username as ‘test01’ and password as ‘xxxxx’” ---- screenshot 2
“it opened a new Chrome instance” ---- screenshot 3
“once i hit the testing url again it opens a alert box” ---- screenshot 4
“to enter the profile credentials so after i enter them i can access the site with that specific user profile” ---- screenshot 5
Please give concrete names of “user” and “profile” you use. please distinguish Windows OS-level user and Chrome user profile. I can not see which one you are refering to when you write a word “user”. Screenshots will tell us about it.
I just select Google chrome icon on the desktop and then press and hold shift key and right click.
It gives run as different user option then i follow the steps as shown in the screenshot.
I tried with script using different windows user in my local machine using Katalon. I can successfully load that user profile with normal scripting but i get an error when i run the same script inside client network as i don’t have permission to access other user profiles. So I will ask for me to grant access for other profiles as this is the only simple way where i can achieve this scenario.