Run Chrome with a different user than the one who started Katalon

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:

  1. It’s a lot to learn to solve the OP’s problem.
  2. 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.

https://autohotkey.com/docs/Program.htm

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.

Thanks for the help!!

Does anyone can help me on this?

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:

  1. you “ran as different user on Chrome” ---- screenshot 1
  2. “logged in using profile with username as ‘test01’ and password as ‘xxxxx’” ---- screenshot 2
  3. “it opened a new Chrome instance” ---- screenshot 3
  4. “once i hit the testing url again it opens a alert box” ---- screenshot 4
  5. “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.

The screenshot for the above:

Below alert or pop up appears when i click on SSO login button

Below is the final destination page where i need to start testing after clicking sign in on alert box

How do you run chrome.exe as different user?

I read https://winaero.com/blog/run-app-different-user-windows-10/ and I found one way like this.

  1. Open Windows Explorer, navigate to the folder where chrome.exe is located (possibly C:\Program Files (x86)\Google\Chrome)
  2. Press and hold Shift key, and right-click on the chrome.exe file
  3. In the context menu, select Run as different user .

Do you do the same steps?

The following article seems to be relevant:

https://www.gerbenvanadrichem.com/quality-assurance/how-to-get-selenium-to-run-the-browser-as-a-different-user/

Selenium Grid, RemoteWebDriver, … it’s a super complexed scenario. I don’t think I can try 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 have seen this but seriously I dont understand the process he followed :frowning:

@Madhuri,

I suppose you should take the suggestion by Ibus seriously applying to you.

Yeah i told them but then after few days again they came back to me asking me to try with other possible solutions to fix this.

@kazurayam

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.

Thanks for your help!!

I was going to suggest to you to find another job. but hopefully not necessary.

:grin: I totally agree with you :wink::+1:

keep pushing. they allways do like this … ‘heey, but what if …’
stay strong on your position, to do it the right way

2 Likes

“Hey, boss, you know you have me testing features of Google Chrome in Windows, right? Why are we doing Google’s job for them?”

2 Likes

Will say that if they don’t give me proper access this time to test. :stuck_out_tongue:

1 Like

Did you find a solution?

This is a 3-years old post. It should have been closed already. You should not add comments to it any longer.

If you have something to say, you should create a new post where you should describe your question clear enogh.

See also