Is it possible to build a custom google chrome extension to run selenium commands when it detects a specific Url/page?
Where to begin? How would you run selenium commands via a google chrome extension?
First install selenium IDE and record all your test cases into it [This is to save your time in writing test cases].
Then get selenium RC binaries for your preferred language (for me its C#). Create your project and take reference of selenium RC binaries. Import all test cases from above selenium IDE in your preferred language and add those into your project.
When you will import the test cases from IDE default browser will be *chrome(i.e. Firefox). To change it to Chrome change browser type when we are creating selenium object
selenium = new DefaultSelenium("localhost", 4444, "*googlechrome", "http://www.google.com/");
To run your project you have to first start selenium server. Here is the guideline for the same.
Note: You can also use selenium web driver in place of selenium RC. And I think if you use web driver then you no need to run selenium server to execute your test cases/project.
Related
Is there a way to completely disable log4net errors appearing on npm console while running test cases . I am using Protractor and Selenium Web driver. I would like to know if this is possible through Protractor's config file Capabilities.
I'm facing up a strange problem in Puppeteer with authentication.
I've written a script to take some screenshot of a website which required authentication.
In my local computer (windows), when running in command line as node.exe my_script.js; it's working fine (in headless moden which is the default mode).
I've written an upper Java program to manipulate it (dynamically set the path, the node modules path, run the process "nodex.exe my_script.js" every 30minutes, manage timeout of the process,...). It's still working directly running from Eclipse, in headless mode.
Then... I've built/packaged a JAR and running it in a cmd window: java -jar my_jar.jar... and then the script can't authentitcated on the website in headless mode (the answser page just write a message like "you need to be authenticated", which is managed by the http server).
To check what happen, I've just add an option in my nodejs script (so I do not modify my java upper program code) to run chrome in non headless mode; with option headless : false. And... it's working!
I let the option to run in non headless mode, and I create a Windows service to run my jar via a bat file, with the help of nssm... Just to test. I'm really happy to see that all is running fine without seeing any chrome GUI (maybe Windows disable GUI for service, don't know how).
Have I maybe missed something? Or is there a bug in Puppeteer or Chrome to manage authentication in headless mode?
Regards
Alex
I want to run some test using selenium standalone server on Google Chrome but i need to pass some ChromeOptions to the chrome driver from command line
Anybody has an idea of how can i do that?
Selenium Core, which is what you are referring to, was released before Chrome existed. Support for Chrome was added later. What you are asking for was never supported, and with Selenium Core deprecated several years back, it will probably never be supported.
One possible workaround is to set the desired options in the Chrome profile.
Another options, although much more painful, is to move up to Selenium WebDriver.
I am using JUB (JUnit TestCase Builder) plugin in Eclipse. I have downloaded JUB plugin and installed according to the instructions given in the following website,
http://jub.sourceforge.net/
While selecting the option "Build Junit Test Case", am getting information like "The chosen operation is not currently available".
Anyone facing the same problem? Kindly reply.
If there is anyother plugin for Junit Test cases Automation will also be useful.
I am not sure about JUB plugin for eclipse, but I would suggest you codePRO analytix for Eclipse for automating test cases since it is easy to install and use.
You can find the details of codePRO analytix here
CodePRO Analytix as a direct plugin is available in Eclipse Market place only for Eclipse versions 3.6 or below. However it can be installed and used with Eclipse versions 3.7 or more by following the below steps. But be aware of the problems which may occur due to version conflicts.
Installing CodePRO in Eclipse:
Download CodePRO v7.1.0 from here
In Eclipse choose Help --> Install New Software...
In the Install window which appears click on the Add button. In Add Repository dialog box which appears, click Archive... button. Locate the downloaded zip file and click Open. The details of the plugin installed will be displayed below. Click select All and Click on the Next button. Accept the terms and conditions and proceed with the installation.
Once installation is complete restart eclipse for the changes to affect.
Once installation is completed you can generate JUnit test cases by
Right click the required file
choose codePRO Tools -> Generate test cases.
Your test cases will be generated as a separated project.
I have downloaded the javafx 2 samples and want to run in from its HMTL. For example there is one javafx application called BrickBreaker. For the specific sample the following files exist : BrickBreaker.jar, BrickBreaker.jnlp and BrickBreaker.html
When double clicking on jar or jnlp the application runs as expected but when i click on the html the application does not run. Instead i get the message "View the conectes of the page. Please install javaFX"
Why is that happening ? ( i have the javafx installed as the application runs when choosing the jar and jnlp files). My guess is that the html should be called from within the context of a webserver meaning that i should deploy my application first to a server and call the url from my explorer. For example if using glassfish i should call the url http://localhost:8080/Brickbraker
The problem is that i don't know how to deploy the javafx application in the server.
i tried to copy paste all the above three files in the autodeploy folder but it didnt worked...
Could you please help me?
Thanks in advance
EDIT: some more info - I have installed JDK 7 and JavaFX SDK 2.0.2
No, JavaFX is client technology, you don't need Glassfish to run it. JavaFX should run in browser the same way as Java plugins do.
If you can't run an application directly from html file it means your browser doesn't recognize you have runtime installed.
There can be next reasons for that:
JavaFX runtime is actually not installed (check in Windows Control Panel)
pure java plugin is not installed (you can check on java.com)
javafx runtime is 32bit and you are using 64bit browser (or vice versa)
you are using not supported browser (e.g. Safari)
you are using not supported system (at this moment, January 2012, only Windows supports runtime)