Phantomjs - Silent Browser - selenium

I was using Phantomjs driver for execution of my Application test scenario.
In the Recent update, they have implemented individual certificates to each machines, so once I enter my application URL and hit enter_key, the URL is redirected to an internal server and I need to provide the Userid and Password to Log in.
This Scenario works well in chromedriver but when i'm using phantomjs, the elements are not getting recognized.
I tried to take the screenshots but only blank image came in the screenshot.

Related

Causes of Selenium Chrome to Many Redirects Error When Chrome Works Manually

I am writing a selenium test which generates to many redirects error; yet, I can manually perform the test. The test fills in a userid and password and presses a login button. I had implemented this test on Chrome 96; however, it doesn't seem to work on chrome 99. I am using selenium 4.1.1. Additionally, the site switched to http/2 during this period. I appreciate any ideas on what the issue might be.

Firefox stuck at Login operation with Selenium-Webdriver

I'm trying to execute Selenium-webdriver code written in Ruby for firefox.
I'm using firefox 45.0.1 because I use ruby 2.1.10 and Selenium-WEbdriver-2.53.4
When I execute Selenium opens firefox, enters address and enters username and password and hits login button.
But after that It stays there with loading symbol near login and also browser says
Transferring data from 34.23.23.2
Selenium is stuck here for 5 minutes and then exists saying timeout and gives below error.
**1.1) Failure/Error:**
#browser.span(:text=>'Login').wait_while_present(10000)
Net::ReadTimeout:
Net::ReadTimeout
When I manually open firefox new tab when selenium opens the firefox and try to login manually, I see the same issue. But When I open firefox manually from desktop and login it works. Please tell me what I'm I missing here.
I suspect that some websites detect when a automated test is running and behave differently, also when selenium starts up it uses a default profile and when you open it manualy your profile is loaded. Cant say for sure that's your problem.

Getting captcha screen when I execute automation scripts using chrome browser

I have been executing automation scripts for last 6 months without any issues. Suddenly chrome browser shows captcha screen and shows message that please confirm are you human ?.
Below that it states 2 points 1.JavaScript might be disabled 2. your cookies are not supported .I enabled both of the Java script and cookies but no luck.
I tried to execute older version of chrome browser also but I am getting same captcha screen in the older version of browser too.
The good thing is that I am not getting captcha screen in Firefox and edge browser. I am getting it only in the chrome browser.
May I know if chrome has introduced any functionality like if we execute automation scripts and it shows captcha screen because why I am getting this doubt that firefox and edge is not showing captcha screen.

How to Force Selenium Webdriver to Use and Keep Cookies?

I'm testing a website which uses cookies for security. Every time a user logs in with a different device or browser they must go through an intensive (email and phone keys) identity verification process. My backup/restore process uses a Firefox addon and works for manual testing.
However when I run Selenium I get triggered to go through the ID process every time. So either Selenium is not using the cookies, or is being given a different browser ID for some reason.
I set a breakpoint to check my cookies are loaded in the Selenium Firefox browser window, but my addon is not available in Selenium Firefox instances.
Selenium documentation is very slim on cookie use:
http://www.seleniumhq.org/docs/03_webdriver.jsp
So any info much appreciated.

How do I detect that SSL is broken on a page, using Selenium

We have pages where we occasionally see compromised SSL certificate because of third party scripts that load non HTTPS resources (Initially they're fine but they occasionally change). We would like to test those pages for broken SSL every day.
We have tried one approach, attempting to catch a pop-up message that would indicate that we have insecure content on the page. However, we have been unsuccessful in simulating the pop-up message through selenium. It appears that selenium has automatically disabled any popups. While we have identified a Selenium method to disable the suppression of the pop-ups(disable-popup-handler) but we have not been able to successfully see the popup even using this method.
Has anyone found a way to detect broken SSL pages using Selenium?
You need to load a browser profile (with WebDriver) that doesn't have the setting for popup blocker enabled (using the Profile class and giving it the right properties). Then, you will get the Windows popup message concerning the SSL cert. If , for some reason, you cannot control the popup using WebDriver (because its limited to Action control only within the browser content window) then you can use Sikuli API to handle the dialog and export the cert to the "Downloads" dir and then copy the file to expected location for inspection. Unfortunately, if you use Sikuli, that will make your automation script sequential and not work via a RemoteWebDriver grid server and so you wont be able to run parallel tests. Hopfully, WebDriver gives you access to the dialog and so you will be able to run with RemoteWebDriver because that is the best way to go when running scripts, even if you run a browser locally.