https://github.com/inflectra/rapise-dynamics-nav
Framework for testing Dynamics NAV
https://github.com/inflectra/rapise-dynamics-nav
Last synced: over 1 year ago
JSON representation
Framework for testing Dynamics NAV
- Host: GitHub
- URL: https://github.com/inflectra/rapise-dynamics-nav
- Owner: Inflectra
- Created: 2020-02-26T09:39:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-11-24T17:08:07.000Z (over 5 years ago)
- Last Synced: 2025-03-01T18:42:44.503Z (over 1 year ago)
- Language: JavaScript
- Size: 456 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Overview
Framework for testing Dynamics NAV 2017-2018 RoleTailored Client.
- Reusable functions are defined in `User.js`.
- `Dropdowns.xlsx` contains lists of values for RVL dropdowns.
- `Output.xlsx` is used to persist data between test executions.
Data for each test case is defined in `Data100.xlsx` and `Data110.xlsx`.
- `Data100.xlsx` is used for execution on Dynamics 2017 NAV demo instance.
- `Data110.xlsx` is used for execution on Dynamics 2018 NAV demo instance.
`TestInit` function located in `User.js` contains the lines that copy correponsing data file to `Data.xlsx`.
```javascript
if (NavVersion() == 110)
{
g_helper.Copy("Data110.xlsx", "Data.xlsx");
}
else
{
g_helper.Copy("Data100.xlsx", "Data.xlsx");
}
```
The way of test parameterization and reading data from an Excel spreadsheet is described in the knowledge base:
[Data-driven testing with spreadsheets and RVL](https://www.inflectra.com/Support/KnowledgeBase/KB357.aspx)
## Common Functions
All functions are defined in `User.js`. Look into this file for details.
**Note:** If you are on Rapise 6.6+ you may use global `Nav` object.

Every function with `Nav` prefix is now also an action of `Nav` (without the prefix). These two variants are equavalent:

### NavLaunch
Launches Dynamics NAV desktop client and waits for it to show up on screen.

### NavVersion
Returns NAV version (2017 - 100, 2018 - 110).
### NavClose
Closes Dynamics NAV desktop client.
### NavChangeCompany
Changes current company. Specify name of a company to open.

This function automatically opens Select Company dialog, selects a company and closes the dialog.

### NavNavigate
Navigates to a specific page using address bar.

This function clicks in the address area, enters a page address and hits enter key.

### NavFilterGrid
Applies a filter to table data.

This function enters a filter value, then selects a field for filtering and clicks the filter button.

### NavSelectFastTab
Selects Fast Tab with a given name.

This function expands a given tab and scrolls to it if necessary.

### NavMaximizeWindow
Maximizes window with a given object.

### NavMakeFileName
Builds full file path.

### NavPrintPdf
Prints/saves document to PDF into OutputFiles folder.

Open this dialog before calling the function. It opens menu Print... > PDF and then enters the file name and presses ncessary buttons to do the job.

### NavAddColumns
Ensures that specific columns are visible. When you call this function the grid should be visible on screen.

This function righ clicks the grid and selects Choose Columns... menu item. Then adds necessary columns and clicks OK button.

### NavRemoveColumns
Ensures that specific columns are NOT visible. When you call this function the grid should be visible on screen.

This function righ clicks the grid and selects Choose Columns... menu item. Then removes necessary columns and clicks OK button.
### SetOutputValue
Writes key/value pair to Output.xlsx

### GetOutputValue
Reads value from Output.xlsx
