Selenium WebDriver for Java Applet based websites - java

I have a website which uses a Java applet. I am trying to automate it using Cucumber & Selenium WebDriver. However, every time I run the website in browser, I get a java security alert (see image), which should be explicitly allowed to proceed further.
Sample image - Java Security alert image
At present, I am unable to proceed beyond this step. Any help would be really appreciated.

Related

How can I write into SSL security pop up pin code with Selenium WebDriver by JAVA?

I'm trying to write in JAVA some function that can write pin into SSL security pop-up for my automation test. Unfortunately I still don't find solutions. This is an element that Selenium doesn't see. Could anybody help me please?
Selenium can click on web elements in Chrome or WPF elements inside windows applications. The pop up is neither one of them.
You can use the Robot object to type to the keyboard, but you have no way to know when this pop up appears or not. Unless this pop up shows at the exact same time everyday.

Best way to ship selenium with java application?

I am writing a java application which has one use: to fill out and submit a form on a webpage (without showing GUI of a browser). I have chosen Selenium for this.
However, how do I "pack" or "ship" Seleniums required browsers with my application? I.e. Selenium requires a browser executable to run the webdriver. I do not know which browser my target audience is using. How do I ship my application to run on any windows clients computer, without requiring them to manually install the browser?
Or am I on the wrong trail and there is a better option than selenium to fulfill my needs?

How to pass value in the screen text fields in a flex application using Selenium Webdriver

I am currently trying to automate a flex application using Selenium Webdriver. The application works on IE 64 bit. I am able to launch the application. But unable to pass value in Login ID and Password field. I have got the object IDs. Could anyone please help me with the syntax to write for this in order to enter the value and login.
Selenium can't handle flex objects, if you want to automate flex application you need to use selenium with other libraries like,
Adobe Genie: https://sourceforge.net/adobe/genie/wiki/Home/
SFAPI: https://code.google.com/archive/p/sfapi/downloads
These are some of the available libraries to automate flex, there are lot more(Flex Pilot, Flex Monkium etc) both open source and commercial softwares available.

Headless Selenium test which fills out a form?

We have a terminal application which serves webcontent via iFrames to our clients.
For some reason, it has been decided that we want to automate the test for this server side. I need to visit a page, fill out a form, and submit it - without actually rendering it in a GUI, I believe a headless selenium driver can do this - but I am new to selenium, does anyone have an example of how to do this in java with selenium?
You can use PhantomJS. Here you can find a working example.

Selenium RC not able to work with downloads popup window

I am new to the selenium RC. I have been working in eclipse to run a simple junit test case to run and download flashplayer from adobe.com.
But the selenium RC is not able to click or even recognise the downloads pop up window. I have been seeing several suggestions in google search but still I am not able to do it.
I have been trying to get the window ID or name of the pop up window to work with it, but still I am not able to do it. I have copied the major function of my code here down below:
public void testPopup() throws Exception
{
selenium.open("http://get.adobe.com/");
selenium.open("/flashplayer/");
selenium.click("id=buttonDownload");
String ids[]=selenium.getAllWindowIds();
for(int i=0;i<ids.length;i++)
System.out.println(ids[i]);
String[] windownames=selenium.getAllWindowNames();
for(int i=0;i<windownames.length;i++)
System.out.println(windownames[i]);
String feedWinId = selenium.getEval("{var windowId; for(var x in selenium.browserbot.openedWindows ) {windowId=x;} }");
System.out.println(feedWinId);
selenium.chooseOkOnNextConfirmation();
selenium.waitForPageToLoad("30000");
}
It will be great if someone can help me out with this.
Thanks
The short answer: you can't.
The longer, but still disappointing answer:
You can't, because no current Selenium implementation supports it. The Selenium people know about it, it's actually nr. 13 in most wanted features in Selenium right now
Selenium RC will never have it because of its technical limitations (It's pure JavaScript. And pure JavaScript can't download and save files.) and it has been deprecated over a year ago. Selenium WebDriver ... well, maybe, in the future. The various things you can try instead:
Rethink whether you really need to download the file. Isn't is ok just to assert that the file exists and can be downloaded by making a HTTP request and seeing that the answer was 200 OK?
Can't you download the file using pure Java after you get it's URL via Selenium? I personally think this is the best way to go.
If you're using WebDriver, there is a great tool for downloading files!
If you're using Firefox, you can set up a clean testing profile that will be configured so that it will download every clicked file into some specified folder. There are addons out there that can help you with it, too. I'm not sure whether Selenium RC supports usign a precreated profile, but Selenium WebDriver definitely does.
If you're using one given browser to do your tests, you can figure out how to download a file "blindly" by pressing buttons blindly. The Robot class can help you with that. You just click the file and then blindly press Enter or whatever keys to download your file into the right place. There is also AutoIt framework which a lot people use for this task.
You can not automate system generate pop-up by using selenium.
For that you have shift over Autoit with selenium.
With the help of this you can records your activities on download pop-up

Categories

Resources