3

Google dropped support for passing windows credentials via URL and it broke a lot of automation for me. (username:password@www.url.com)

https://www.chromestatus.com/feature/5669008342777856

I found there is a solution using AutoItX dll which I added and it works fine when running locally, but when deployed to web server it does not send key strokes.

This is what I have.

AutoItX.WinWaitActive(authenticateurl + " - Google Chrome", "", 10);
AutoItX.WinActivate(authenticateurl + " - Google Chrome");
AutoItX.Send(AdminUsername + "{TAB}");
AutoItX.Send(AdminUserpass + "{ENTER}");

Any idea why AutoItX would not work when deployed? Is there a better alternative to pass windows credentials in the Chrome Browser? Thank you in Advance!

user4157124
  • 2,809
  • 13
  • 27
  • 42
Gnom
  • 41
  • 2

1 Answers1

0

I'd guess that this is because that code will be running under a low privilege user account on the server (more than likely a local system account rather than a domain account).

You'll either need to swap the account that the app pool runs as (be careful if there is anything vaguely confidential on the server in question) - or debug why the current account isnt allowed access.

In the second case, you could try logging onto the machine, running a browser as that system account and then watching the Event Log to see what logs are generated when you try to log on manually (you could also do this while running your automation if you dont have that account's credentials).

Steve Land
  • 4,852
  • 2
  • 17
  • 36
  • Thanks for reply! App pool is running using my domain user account for now which has full privilege. I also registered dll to see if it helps. – Gnom Jul 10 '17 at 22:01
  • Definitely not my suggestion then. If you're on windows perhaps its this: https://stackoverflow.com/questions/6810692/how-to-use-autoitx-in-net-c-without-registering ? – Steve Land Jul 10 '17 at 22:04
  • Yup, on windows web server and it's a C# project using Selenium driver, Autoit dll. The url you have is just to allow for avoiding registering dll. I don't have that particular issue or need for it. Just trying to find a way to pass windows credentials. No errors are thrown either. – Gnom Jul 10 '17 at 22:28
  • Fair enough. The only other thing I can think to check is if you log on to the server and browse to another site that uses similar authentication to see what happens - it may be due to the security limitations on Windows Server rather than your site or user account. – Steve Land Jul 10 '17 at 22:33
  • So this is certainly could be an issue on the webserver. This is the example as well as url which has the same behavior. Only works locally, but not from the deployed solution. http://learn-automation.com/handle-windows-authentication-using-selenium-webdriver/ The login authentication url: https://www.engprod-charter.net/ – Gnom Jul 10 '17 at 22:57
  • I'm all out of suggestions then, sorry I couldnt be of more use! – Steve Land Jul 10 '17 at 23:02