handle windows login pop-up using selenium web driver for https website - selenium

My scenario:
I am opening a https website, I get a login pop-up that is not identified by selenium webdriver. I have searched and found the below link which had similar question.
How to handle login pop up window using Selenium WebDriver?
I tried he solution given by #Pavel Janicek to pass the credentials via URL
It does not working for me, I mean after the browser is opened it keeps processing nothing happens after that.
In my case, it is a https site,i need to give username#domainname & password to login, giving only username will not work
my url looks like this
https://username#domainname:password#sitename.com
Has anyone faced this kind of problem?
Thanks

You can NOT auth with this window(in selenium without any additional framework as Robot). But you can auth without getting this window. Try change URL to: http://user:password#www.yourserveradress.com
if this will not help, you need to create separated profile in browser, pass authentication on this server and remember password and use this profile in selenium. Also I think its possible to use Windows active directory authentication, but cannot sure about details.

Related

Login through Google SSO using automated browser

I am trying to automate login to my app which uses among others, google sso authentication.
However login form return error "This browser or app may not be secure.". I set my google account options to allow less secure apps but still nothing.
I browsed few topics:
GMail is blocking login via Automation (Selenium)
Selenium Google Login Block
Automation Google login with python and selenium shows ""This browser or app may be not secure""
And it seems that google is blocking this way at all in favor of oauth.
People write in these topics that solutions stopped working recently
So is it currently possible, to set ChromeDriver somehow using capabalities, to be able to login through SSO?. I need a simple solution, that will run headless with other scripts on cloud (not something that would require me to manually login first on another instance as one anwser suggests).
If its not possible or extremly complicated please tell me I will not waste time on it.
If you want to use chrome capabilities, what you can do is set the user-data-dir to a chrome profile that has already been signed in using SSO.
You should look up how to reuse chrome profiles with selenium.
If your accounts have 2 steps verifications, google believe it's safer and allows you to get login. Then the issue will be how to handle the 2 steps verifications. Working on that :/

Testcafe - Typing user name and password into Native Dialog

I'm using Testcafe to test a corporate web solution.
One of the ways we authenticate is Windows authentication.
If this type of authentication is enabled, on the page load, a native dialog appears and I have to type in user name and password and click Sign In, or Cancel.
I couldn't find an explanation or example of this in TestCafe.
Can anyone please help with this?
You can use the approach described in the HTTP Authentication topic for this purpose.

InternetExplorerDriver not opening site, but user can open it

I'm working in a highly secured environment. I can only use IE11 by company's policy. I'm trying to implement test automation on my project.
I'm using Selenium and IEDriver.
Currently I'm trying to implement basic scenario by just opening application page.
When I'm trying to do it via IEDriver, the page is not getting opened and the message "This page cannot be displayed" is shown.
But when I open the page manually by just typing in the url to the address bar everything works fine.
I guess it has something to do with the cookies that are coming with the request I'm making manually. Seems like those cookies contain some signature.
Can someone advise me how can I track the problem to resolve it?
Thanks.
Be sure top follow the required configuration section on this site: https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver
I had some issues with IE acting the same way until following this setup.
So the issue was fixed by setting proxy.
Seems like there was a change in security rules recently.

How to handle browser authentication in Webdriver

I am trying to automate a web application deployed in an websphere application server environment. Websphere has application security enabled, so to access the application an username and password is required in the browser popup box. I am having a hard time automating the username password entry in this box from selenium webdriver. Most of the answers found on google suggest using "user:pass#URL" format, but this does not work for me. I am using firefox as a browser and using java as the language. How to solve this issue ?
How do you approach in situations where you enter username and password in normal window? Don't you externalize username and plain passwords in config files? If security is concern, save in encrypted format in config files and decrypt at run time. Getting around the JS popups is not easy and straightforward, using Robot solution is flaky too.
Send username and password through url like http://username:password#your-app.com. This should work.
String url = "http://username:password#your-app.com";
driver.get(url);

Checking a list of logins on dropbox

I have a strange request for a project - we have a text file containing a list of login credentials for Dropbox for around 10 users. I have to validate their credentials automatically and notify the users if login fails with their credentials.
I've looked at the dropbox API, but that uses OAuth, which requires the user to manually fill in credentials, but that doesn't do the trick for me.
Is there a way for me to check if a bunch of logins? I've looked at the DropboxUpload repository on github, but it works fine for single user logins, but fails to achieve what I want when it comes to checking the same thing for multiple users.
Any help/leads on how I should go about proceeding with this would be greatly appreciated!
Many thanks,
John
You can use dropbox webpage to check user credentials doing normal login/logout but in an automated way.
To create a "bot" which will login and logout and check if credentials are correct you can use Selenium.
Selenium is a framework for testing web page ui but it can also be used to create automated checker/tester/bot for what you need.
It is also possible to setup selenium in a such way that it will use renderless browser engine so no browser will be visible during test/check. This also speeds up the process of testing.
I hope this will help you if you'll not find any better way and can be used as a final solution since it is not the best way to check credentials