JDN plugin
JDN plugin is a Google Chrome extension. It helps Test Automation Engineers to create Page Objects in the test automation framework and speed up test development in test environments such as Eclipse IDE or IntelliJ IDEA.
The plugin allows generating Page Objects with the following restrictions:
- is applicable to the JDI framework;
- creates xPath locators’ type;
- works with Material UI and HTML5 websites.
:warning: Before using this plugin, you will have to launch the backend server locally unless you are an EPAM employee.
Video instructions
You can find the video instructions on YouTube in English or in Russian.
Contents
Plugin setup
The current JDN version is available in the Chrome Web Store or can be downloaded as a client-server application.
Frontend setup
- Install JDN plugin from the Store;
- If you are an EPAM employee, turn on EPAM VPN to enable connection to a server. In other cases, please proceed to the Server setup section. (below)
If the plugin does not work after downloading from the Chrome Web Store, you can install it manually.
Instructions to set up manually
*It is recommended to use the version from [Chrome Web store](https://chrome.google.com/webstore/detail/jdn/dldagjdnndapekahhbpeemjifghccldg).*
1. [Download](https://github.com/jdi-testing/jdn-ai/releases?q=release) the latest release of the plugin.
* For the developer team only: [Download](https://github.com/jdi-testing/jdn-ai/releases) the latest build (you need a .zip file named like the needed JDN version).
2. Unpack the content to a local folder (the result folder name is `dist`).
3. Open Chrome Settings → choose the option “More tools” → choose the option Extensions → turn on the Developer mode → click “Load unpacked”.
4. Select the `dist` folder with the plugin on the subfolder's level.
5. Open Chrome developer tools via F12 (fn+f12) hotkey. The JDN tab is added as the last tab of DevTools.
Server setup
If you are an EPAM employee, skip this section. Turn on EPAM VPN to enable connection to the server and :warning: make sure the VPN connection is established. In other cases, please use the instructions below.
- Set up Docker Desktop or Docker CLI
- Run Docker Daemon
- On Windows 10, use the command line; on macOS and Linux, use the native terminal.
Windows
curl --output jdi-bootstrap.ps1 https://raw.githubusercontent.com/jdi-testing/jdi-qasp-ml/master/scripts/bootstrap.ps1 && ^
powershell -executionpolicy bypass .\jdi-bootstrap.ps1
macOS/Linux
curl --output jdi-bootstrap.sh https://raw.githubusercontent.com/jdi-testing/jdi-qasp-ml/master/scripts/bootstrap.sh && \
bash jdi-bootstrap.sh
Commands to install the development version
**Windows**
```shell
curl --output jdi-bootstrap.ps1 https://raw.githubusercontent.com/jdi-testing/jdi-qasp-ml/develop/scripts/bootstrap.ps1 && ^
powershell -executionpolicy bypass .\jdi-bootstrap.ps1 -Branch develop -Label develop
```
**macOS**/**Linux**
```shell
curl --output jdi-bootstrap.sh https://raw.githubusercontent.com/jdi-testing/jdi-qasp-ml/develop/scripts/bootstrap.sh && \
bash jdi-bootstrap.sh -b develop -l develop
```
:warning: It can take time to build the docker image, please, wait till the end of the installation.
Working with JDN plugin
Prerequisites: check that the backend part is running. The current version of the backend should be displayed in the JDN plugin tab near the front-end version: it is the easiest way to check that back-end is installed properly and connected.
Note: You can launch JDN plugin in only one tab. Incognito mode is not supported yet.
Launch JDN plugin
- Open the page to create page objects in Chrome.
- Navigate to DevTools by pressing Control+Shift+J (Windows, Linux, ChromeOS) or Command+Option+J (Mac).
- Make sure DevTools has a dockside view. If not, click the vertical dots ⋮ icon at the top right and choose Dock to left or Dock to right.
- In the top menu, click the more » icon and choose JDN.
Generate page objects
- Click on the +Page object button.
- Choose the library.
- Click on the Generate button in the new section.
The generation process may take some time. The locators will be generated for the website page in the active tab.
- Edit or delete locators, if needed.
- Check one, several, or all locators.
- Click the Save button. Now, you can delete or download page objects.
Download page objects
To download a single Page object:
- Call the Page Object Actions Menu by clicking the three dots icon.
- Choose the download option. Page Object will be downloaded to your computer as a Java file.
You can also copy a Page object to the clipboard.
To download all generated page objects as a project template, click the download icon at the top of the list. The project template will be downloaded as an archive.
Manage locators
To manage a locator, click the three dots button next to it and choose an action:
- Edit - change the block type, variable name or xPath of the locator;
- Copy - copy to clipboard in various formats;
- Advanced calculation - allow more time for processing the locator. The default period is 1 second.
- Delete / Restore - delete a locator or a bunch of locators;
- Stop/ Rerun generating - stop processing if a locator is generating;
- Change the priority – change the priority of a locator generating.
FAQ
Frequently asked questions
Support
Support chat in Skype