My selenium RC java code is running successfully on firefox. Can anyone tell me how to run the same test case on internet explorer?
Change the browser start command string you pass to DefaultSelenium factory. It will be *iehta or *iexplore depending on your selenium version.
new DefaultSelenium("localhost", 4444, "*iexplore", "http://www.google.com/");
Check out the docs for more info.
--Sai
Just replace *firefox with *iexplore. The exact code will vary depending on what language you're writing your test in or how you're actually launching the browser.
see: http://seleniumhq.org/docs/05_selenium_rc.html#from-selenese-to-a-program and click the button for your particular language.
If you hit the Script error while running tests on IE with selenium RC, it might be because of not running the selenium server with Administrator privileges. I had the similar issue and could get it running with by running the selenium server as an Administrator
Very simple: Use "*iexplore" instead of "*firefox"
In order to work the scripts on IE do the following steps
1.Navigate to ToolsInternet OptionsSecurityTrusted Sites
2.Click on “Sites” button and add the Urls of the application you are testing in “Add this website to the zone:” and clicking on “Add” button.
3.Navigate to ToolsInternet OptionsSecurity and disable the checkbox “Enable Protected Mode (requires restarting Internet Explorer)” and click on “Apply” and click “Ok”.
a. Navigate to ToolsInternet OptionsSecurity
b. Add all the URL’s of your application in the “Address of websites to allow” and click on “Add” button.
Navigate to ToolsInternet OptionsAdvanced options. Scroll down to the Security section, and select Allow active content to run in files on my computer. This will get rid of the pesky toolbar alert, and allow JavaScript to run automatically.
Related
I am dealing with a small problem. I am working on automating few tasks in a web application,i can open the webpage,enter the login,click login,BUT then it starts to act strange. If i click on the login manualy it logs in without a problem.
But if i try to do it via selenium (JAVA jdk1.7.0_75,selenium-java-2.53.1,running on IEDriverServer_Win32_3.4.0) the page opens with error An error has occured.
java.lang.NullPointerException. and with "Window language could not be determined "
The page is on the intranet. I guess the application has a problem with the Webdriver (everything works if i try to automate the task using the VBS).
Dont you know any "workaround" for that?
(I can use only IE,because chrome no longer supports NPAPI so the application does not work in chrome)
InternetExplorerDriver driver = new InternetExplorerDriver();
driver.get("*the webpage*");
driver.findElementByName("userid").sendKeys("*login*");
driver.findElementByName("password").clear();
driver.findElementByName("password").sendKeys("*password*");
driver.findElementByName("ctr").sendKeys("*number*");
driver.findElementByName("menuType").click();
driver.findElementByLinkText("OK").click();
I think the problem is somewhere in the settings,because as i mentioned,if o open the browser manualy and login,it works,no errors and i get into the app.
But the webdriver "browser" has somehow different settings (i think) so it does not work. Problem is,that we have restricted access to the settings of browser,so i cant do much about that.
Thank you very much for any suggestions/answers/tips!!
Kind Regards,
Jerry Woodburn
I have written Java code using Selenium Webdriver and AutoIt that opens a Firefox driver, navigates to a page that requires authentication via selection of a soft certificate, selects the appropriate certificate when the Certificate Selection window pops up, and clicks OK, at which point the page I'm accessing should load but instead it just loads a blank "New Tab"; a new tab isn't opened per se, just the current tab remains blank with the title of "New Tab".
If I perform this process manually (without having Selenium Webdriver open a Firefox driver and I just launch it myself) using the same exact Firefox profile, the page loads after authentication just fine. I should also note that the page loads successfully using driver instances of Internet Explorer and Chrome.
I am using Firefox v33.1, IE 10, and Chrome v38. Finally, I should note that this has nothing to do with my automated certificate selection process because even if I only have Selenium Webdriver open a Firefox driver and stop there and then I take the wheel and select the certificate myself and click OK, it still does the same thing.
I think Selenium Webdriver might have some annoying guard built into the Firefox drivers it instantiates that prevents it from loading pages requiring authentication. If this is the case, does anyone know how to possibly disable that?
Java needed to be set to "Always Activate" under the Firefox Add-ons -> Plugins. Before it was set to "Ask to Activate" but it never explicitly asked to activate after I selected the certificate, thus the page wouldn't load.
We are facing this issue on our clients machine.
Our project uses a third party java applet to open the files in respective softwares.
On windows7 we don have any issue but we have issue on windows8 OS
our project is working fine in IE10 and FF browsers. of windows8
this error is thrown only in chrome.
but when we execute same third party demo site which uses this same java applet to open the files in respective softwares, that is working fine in all browsers without making any changes in settings.
I have read many replies from different ppl that we need to changes the client java secutiry settings.
But how can we ask all our clients to make this setting so this is not a proper solution for our problem.
Please see the image below
![Error message][1] is
"Your security system have blocked an application with expired or not yet valid certificate from running"
please help me solve this ..
Go to Control Panel -> Java -> Security -> Edit Site List
Solution published in my website:
http://www.myerrorsandmysolutions.com/application-blocked-by-security-settings/
Go to Control Panel
Java
in the Security tab click the “Edit Site List…” button
click Add button
insert the URL of the website that you want access in (URL should begin with http:// or https://)
click Add button
click OK button
click OK button
Note: you could find an icon Java (32-bit) rather than Java.
If you won’t find in Control Panel a Java icon or the “Edit Site List…” button is missing and you are sure that Java is installed, open a text editor and create a file with name exception.sites containing the URL of the website that you want access in (URL should begin with http:// or https://) and save it in the following path:
C:\Users\username\AppData\LocalLow\Sun\Java\Deployment\security
where
username
is the name of the user.
go to Control Panel -> Java -> Security , choose minimum security level , Medium(Least secure setting), then click ok , save and try again...
I am new to selenium.....
I've written a selenium code with java for Automation script. while running the script i am getting a Security Warning window which has the options called 'Continue' and 'Stop Script'. How to click Continue through selenium control. There is no way for getting xpath or id of the continue button.
its not a application window,it is firefox security warning window..So, the alert window method accept.alert() is not working.
can u please tell me how to handle those type of firefox warning windows.
In my code below two lines of code to solved the problem "Warning: Unresponsive script " error is coming while running automation script in Selenium server
By using these two lines of code in setting firefox preferrences.
profile.setPreference("dom.max_chrome_script_run_time", 0);
profile.setPreference("dom.max_script_run_time", 0 );
My selenium based test-suite works fine while I was controlling just the browser.
A new test case I need to add into the suite which requires interacting with Windows Browse/Upload file explorer after selenium has clicked upload button in under test page on the browser.
I couldn't find anything in Selenium RC documents about how to write filename in the (windows GUI) browse's "file name" field and click (windows GUI)Open button. Any ideas? Thanks!
Just to let you know in advance.
The test-suite executes test on 100s of remote machines concurrently. So auto-it-script workaround won't work for me.
Selenium RC supports file upload, but not using the browser mechanism directly. Check out the AttachFile() method, which takes a URL for the file and downloads it to the browser machine before then uploading it to the application.