“This is the second day of my participation in the First Challenge 2022.

preface

In the morning, I turned on PyCharm to start the work of the new day, but unfortunately PyCharm expired again. Although I found a new activation tutorial, the activation materials provided in the tutorial were stored in Baidu disk, but our company banned baidu disk, so I downloaded them using baidu disk of my mobile phone, and tried to upload them to the computer through wechat of my mobile phone. However, I don’t know where the data downloaded by iPhone is stored on the phone, and this may take a long time. In order to start my work quickly, I decided to use vscode

configuration

My system is Windows

1. Install the Python plug-in

Open VScode, find the extension button, click the extension button, enter the name of the plug-in python in the search box, and then click install to install it. As shown in figure

2. Install Robot Framework Intellisense

Enter Robot in the plug-in search box and find Robot Framework Intellisense to install. This plug-in is designed to support RF development. After installing this plug-in, it has the following advantages:

  • Syntax highlighting

    All. Robot /. Resources files of RF can be supported. If you want to support “. TXT “in RF, you can set the following Settings

"files.associations": {
    "*.txt": "robot"
}
Copy the code
  • Code jump, you can jump to variables and user keyword defined by using the shortcut F12 or CTRL

  • To find all the places where a particular keyword is used, Windows uses the shortcut shift+ F12

    For example I look up all key CommonClickButtons using my custom

  • Code completion
  • Code advice

There are other features, you can refer to the official document marketplace.visualstudio.com/items?itemN… To try

3. Install Robot Framework Language Server

Enter Robot in the plug-in search box to install the Robot Framework Language Server. This plug-in has the following restrictions: Python version 3.7 or RF version 3.2 or later. If you are using the Robot Framework Selenium Library, the Library must be at least version 4.4. After installing this plug-in, there are the following advantages:

  • Support TestExplorer ‘
  • Support for interactive consoles
  • Code analysis to check that keywords are imported and defined correctly
  • Code for keywords, keyword parameters, section headings, section Settings, variables, resource imports, and library imports is complete

There are other advantages, is not here to detail, refer to the official documentation marketplace.visualstudio.com/items?itemN…

The most intuitive feeling is as shown in the screenshot, there is a running button in front of each case, this is very nice, even without RF graphical interface ride, we can easily execute any case, unlike the command line and tag execution in PyCharm, on the other hand, this execution failed. Log information is displayed more friendly, will be directly located in which line appears

For example, the execute button in front of each case will have a green check mark after successful execution

The execution failure will change to a Red Cross, showing the error message

conclusion

All in all, the experience is better than PyCharm, which supports RF development and requires the installation of various plug-ins, but sometimes syntax does not highlight properly, code jumps, and case execution. Previously, PYCharm was responsible for coding and RF’s ride was used for debugging. Now I think it is better to use a vscode, and the interface is great, more importantly is free, do not need to often crack ah