Helium can be used with any Java IDE on the market. The only step that is required to configure an IDE to work with Helium is to add Helium's heliumlib/ directory to the classpath used by the IDE.

Prerequisites

In order to use Helium, you need to have extracted it on your machine. For instructions on how to do this, please consult our Getting Started page.

The remainder of this page consists of the following sections:

Setting up Eclipse to work with Helium

To set up Eclipse to work with Helium, you need to have an Eclipse project. If you don't already have one, please complete the wizard under File->New->Java Project.

Add Helium's JAR files to the classpath

Right-click on your Eclipse project directory in the Package Explorer and select Properties. Then, click on the Java Build Path item on the left and choose the Libraries tab. Click on the Add External JARs... button and navigate to the heliumlib/ directory in the location where you extracted Helium's Zip archive. Select all JAR files in that directory (eg. by pressing Ctrl + A, or Cmd + A on Mac). Click Open. Assuming that the contents of the Helium Zip archive are at C:\Tools, the configuration window should then look as follows:

Eclipse Project Properties

Click OK and you're ready to write Java scripts which use Helium's API!

To test whether you have done everything correctly, you can follow these steps:

  1. In the Package Explorer, right-click on the src folder and select New->Class.
  2. Leave everything at the default values and enter Main as the class name.
  3. Click Finish.

Your Eclipse Window should look similar to the following:

Eclipse Java class

Paste the following code into the Main.java document:

import static com.heliumhq.API.*;

public class Main {
	public static void main(String... args) {
		startChrome();
		goTo("google.com/?hl=en");
		write("Helium");
		press(ENTER);
		click("Helium - Wikipedia");
		killBrowser();
	}
}

If you now right-click Main.java in the Package Explorer and select Run As->Java Application, you will see Helium run the above script :-)

Setting up IntelliJ IDEA to work with Helium

The first step to setting up IntelliJ IDEA to work with Helium is to ensure you have an open project. If you don't, please open an existing project or click Create New Project->Java in IntelliJ's welcome screen, entering any name as the Project name. Click Finish to complete the wizard.

To add Helium's JAR files to the IntelliJ project's classpath, click File->Project Structure.... Select Modules on the left and open tab Dependencies. Click on the Plus symbol on the right and select Jars or directories.... Navigate to the directory where you unzipped Helium's Zip archive, and select the heliumlib/ subdirectory. Click OK. The Project Structure window should now look as follows:

IntelliJ Project Structure

Click OK to confirm your changes.

To verify that you have done everything correctly, right-click on the src folder in the project view on the left and select New->Java Class. Enter Main as the Name and click OK. Your window should look similar to the following:

IntelliJ Java class

Paste the following code into the Main.java document:

import static com.heliumhq.API.*;

public class Main {
	public static void main(String... args) {
		startChrome();
		goTo("google.com/?hl=en");
		write("Helium");
		press(ENTER);
		click("Helium - Wikipedia");
		killBrowser();
	}
}

If you now right-click Main in the project view on the left and select Run 'Main.main()', you will see Helium run the above script :-)

Helium can be used as a library from any Python IDE which is available on the market. The only step that is required to configure an IDE to work with Helium is to add Helium's heliumlib/ directory to the PYTHONPATH used by the IDE.

Prerequisites

In order to use Helium, you need to have extracted it on your machine. For instructions on how to do this, please consult our Getting Started page.

The remainder of this page consists of the following sections:

Setting up PyDev to work with Helium

To set up PyDev to work with Helium, you need to have a PyDev project. If you don't already have one, switch to the PyDev perspective (Window->Open Perspective->Other...->PyDev). Then, create a new PyDev Project by completing the wizard under File->New->PyDev Project.

Add Helium's libraries to the PyDev project's PYTHONPATH

We will add Helium's heliumlib/ directory to the PYTHONPATH of the PyDev project. To do so, right-click on the project directory in the PyDev Package Explorer and select Properties. Then click on the PyDev - PYTHONPATH item on the left and choose the External libraries tab. Click on the "Add source folder" button, navigate to the directory that you extracted Helium's Zip archive into and choose the heliumlib/ directory. Assuming that the contents of the Helium Zip archive were extracted to C:\Helium, the configuration window should then look like this:

PyDev Project Properties

Click the OK button and you're ready to write Python sripts which use Helium's API!

Setting up Aptana Studio to work with Helium

Aptana Studio uses PyDev as the Python programming environment. To set up Aptana Studio to work with Helium, you can therefore follow the instructions for setting up PyDev & Helium, above.

Troubleshooting

If you get an ImportError when trying to import helium.api, then it is likely that your IDE is not correctly configured to have Helium's heliumlib/ directory on the PYTHONPATH. To troubleshoot this problem, please test whether you can import helium.api directly in the python.exe console, as described on our Getting Started page.