Pycharm is known as an excellent editor for writing Python. You can also install a lot of plug-ins to complete a variety of SAO operation.

One day, I was inspired to search robot in pyCharm’s plugin library, and found a plugin library that supports the Robot Framework, so I tried it.

While less friendly than the Eclipse tool’s support for Robot scripts, installation is minimal.

Follow me through on how to implement and run the robotframework use case in pycharm.

Benefits:[Test data]

1. Install robot in PyCharm

Open PyCharm and in the Settings of PyCharm, find plugins. Searching for Robot in plugins yields the following plug-ins:

As can be seen from the figure:

The Robot Framework Support plugin and IntelliBot plugin are heavily used.

The downloads are 195.5K and 206.7K, respectively

But IntelliBot, which was last updated in 2016, hasn’t been maintained in nearly three years. RobotFramework Support is still being maintained. In the long run, Robot Framework Support is a better option.

Click the Install button to Install the plug-in.

Once the installation is complete, restart PyCharm and go to the Preferences page shown above. In the file template of the Editor, you can see the RobotFramework test case files and keyword files.

In the file type, you can see that the default file suffix of RobotFramework scripts is. robot

2. Write RobotFramework test cases

1. Create a new project.

728 x 196 1466 x 394

2. Create the Robot test case file

Right-click project name -> New -> Robot File. The template for the Robot use case is automatically brought up.

3. Write Robot test cases

Write corresponding content in different sections using RobotFramework syntax.

ps:

  1. The plug-in comes with its own highlighting. As shown above.
  2. Select the keyword, press Ctrl+ B can jump directly to the keyword source code.

3) There is no robot keyword automatic completion mechanism. You need to find the keyword name yourself.

4) In the Projects area on the left, there is no display function of available keywords.

3. Configure the use case to run the RobotFramework

The Robot use case, after being written, does not run. You need to go through some configuration in PyCharm before you can right-click and choose Run.

1) Add External Tools. Add a tool to run Robot.

The robot script is run primarily with robot.exe. Robot. exe is in the Python installation directory.

2) In the Robot file where the test case is located, right-click the space -> Extenal Tools -> select Run Content

The running results are as follows:

At this point, the robotframework written in pycharm has been applied.

No contrast, no harm. Without contrast, you don’t know the difference between good and bad.

Comparatively speaking, eclipse is the best place to write the robotframework with the RED plug-in.