Can we handle OS pop-up using "gem sikuli" in selenium script - ruby

When I hit url in browser it gives windows authentication pop-up and we need to enter proper username and password into that then only it will give home page of that site.
It is not able to handle windows pop-up using Selenium-WebDriver
I was trying to handle that pop-up using gem sikuli code inside selenium script but it is giving error as
Timeout::Error: execution expired

OS pop ups cannot be handled using Selenium Web Driver , however there are numerous other frameworks that can handle it. This is for a upload window , thus should work for your scenario too.
This is what I use in C#

driver.get("http://LOGIN:PASSWORD#localhost:8080/myApp/")
LOGIN> -> username which you need pass for authentication
PASSWORD> -> password which you need pass for authentication
After # put your URL.
Don't forget to put / at the end of the URL, At-least for firefox.

Related

How to open a url on browser using expect script?

My bash script when runs produce a URL (basically a login URL to azure), wherein the user has to login to Azure account. I want to automate this using expect script so that the URL automatically opens up in the browser.
This is the kind of URL that my shell script produces :
Please log into Microsoft Azure
To sign in, use a web browser to open the page https://microsoft.com/devicelogin and enter the code ******* to authenticate.
Depending on JS usage on the webpage, you will not be able to login using expect / curl.
You might want to consider using selenium with firefox, which can record a standard login session and replay it later.
You might then fun firefox headless with selenium to login.

Why jx install runs chrome to get the admin token?

When I run jx install I get those error messages
Attempting to find the Jenkins API Token with the browser in headless mode...using url http://jenkins.jx.35.205.149.20.nip.io/me/configure
unable to automatically find API token with chromedp using URL http://jenkins.jx.35.205.149.20.nip.io/me/configure
retrying after error:Running in batch mode and no default api token found
Unfortunatly, I'm running those install script from an Ansible docker container. As a consequence, I have no chrome installed in container (neither do I have an X environment and window manager).
So why is this token retrieved ? And is there a way to set it "by hand" (through another jx command, as an example) ?
there’s currently no other way with Jenkins to get an API token until we move to ephemeral / one shot masters rather than static masters.
We could disable the use of Chrome though? If it cannot use Chrome to get the API token the code asks you to visit the URL and copy/paste the api token from the Jenkins console

Katalon browser authentication on Mac

Im trying to automate a site (using Katalon) that uses browser authentication on a Mac.
I can see that Windows users can use the Authenticate keyword, but is there a similar keyword or setting / configuration option for Mac users?
A way i was able to solve this was by adding credentials via the url as seen in Can you pass user/pass for HTTP Basic Authentication in URL parameters?
Changing the url to the following format solved the problem:
WebUI.navigateToUrl('https://username:password#example.com/')

Use Currently Saved Cookies in Watir Webdriver

Is it possible to use currently saved cookies in Watir Webdriver when launching Chrome?
I set my chrome to "remember me" when login to facebook so that the next time I access facebook, I don't have to type the username and password again.
But, when using watir webdriver, the Chrome will open it like new session and accessing facebook like the first time which requires me to type the username and password again. I expected it to directly open facebook without going through the login page again.
Is there a way to do that?
Thank you very much.
You need to create a custom profile for Chrome, adjust its settings as desired, then direct Watir to use it by setting the Chrome switches.
args = ['--user-data-dir=/path/to/your/custom/profile']
Watir::Browser.new :chrome, options: {args: args}

"An error has occurred. Please go back or close the browser and try again" when record using jmeter's proxy

I am doing performance testing of a .net application. Whenever we enter url into the browser a browser window opens asking for username and password. After entering that page of site appears.
After setting proxy when I clicked on start button to record script and entered URL to the browser, a message:
An error has occurred. Please go back or close the browser and try again.
appeared.
Now no login window is getting opened.
What you see is HTTP authentication window. It can be of 3 types: Basic, Digest, NTLM.
JMeter supports only Basic and NTLM authentication. If your site uses it, you can add HTTP Authorization Manager with correct base url, username and password to your test plan.

Resources