Now you have recorded your test and want to export it so you can use it in Bromine. This task is quite easy after you have installed the Bromine 3 format for Selenium IDE. Simply goto options and select “format” now you are presented with an array of different formats. Select the Bromine 3 format you previously installed, the IDE should now have converted the test into a Java test for Bromine 3.
For now leave the Selenium IDE open and start up NetBeans. The first thing you have to do is create a new Java project, press File and then New Project. Select “Java” in the category list and in the projects list select “Java Application” press Next when done. Next you have to name your project, give this some thoughts as the more descriptive the name is the better. Make sure that the checkbox “Create Main Class” is unchecked. Click Finish. You should now be able to see a tree containing your projects.
As you can see this tree contains a complete list of all your projects. If not already, expand the project you just created and right click your project and select “New” and then “Java file”. For the Class Name input “TestNew”, you can name it anything you like but then you will have to edit some of the generated code so for now just call it “TestNew” and you will not have to deal with it. Note that the name is case sensitive. Now press Finish. You are now presented with an almost blank file. Now go back to the Selenium IDE and copy all the generated code and paste it in the file overwriting the existing text. NetBeans should now highlight a lot of the text with red, that is because we need to add the external libraries to our project. To do this right click the “Libraries” under your project and select “Add JAR / Folder”. In a newly installed Bromine you will be able to find all the external libraries needed under “your www folder\app\webroot\testscripts\Google Sample\jar\lib”. and select all of them, by using CTRL or ALT you can select multiple libraries. Now all the red underlines should have been removed and a green light in the top right corner should be present.
Before you build and compile your test you have to set the main method in the project. The technicalities will not be discussed here, just be aware you have to set it yourself. Right click the project and select “Properties”. Click “Run” and next to the field that says “Main Class:” click on “Browse”. You should now be given a list over possible classes container a main method. Select “TestNew” which is the name of the file we created earlier. Click “Select Main Class” and close the properties window.
You are now ready to build and compile your test script for execution in Bromine. To build and compile right click the project and select “Clean and build”. In the output window in the bottom of the screen you should get a Message saying “Build successful”. Here you can also see the location of the jar file you are to upload to Bromine.
Back to top