Dynamics 365 Business Central is a successor of Dynamics NAV 2017 Web Client. Both solutions were built by Microsoft using same technology though they have a few differences. Rapise includes a library DomDynamicsNAV which makes test recording and playback of Dynamics NAV web clients a pleasant thing. From this post you will learn basics of recording a reliable test for these solutions as well as test playback troubleshooting methods. We'll use Dynamics 365 Business Central as system under test.
Important note: tests created for Dynamics NAV 2017 Web Client may not work on Dynamics 365 Business Central without any changes. Though both solutions look very similar there are differences in design.
Note: at the time of writing this article the best option is to use Firefox for recording. Firefox version used is 60.0.1 (64-bit).
In this article we'll not cover login into the system. Best option is to setup auto login:
or record a separate test that will ensure that user is logged in and just invoke it at the beginning of your test scenarios with Global.DoInvokeTest.
You can also use login test from rapise-powerpack repository.
So we start from the home page.
After performing a first recording session do self check. Ensure that the list of libraries in the main test file contains DomDynamicsNAV.
g_load_libraries=["%g_browserLibrary:Firefox HTML%", "DomDynamicsNAV"];
Do not hurry and let Rapise capture your actions. When an action is captured it is added to the Recording Activity Dialog:
Note: Rapise does not capture drag and drag & drop mouse moves.
Record in small sessions: 5-10 steps. Then ensure playback works as you expect. Rapise can attach to a browser at any state (unlike Selenium which always starts a new browser session).
Clicks on links and buttons are just recorded, nothing special.
Click on a field to set focus. Rapise will capture the Click action. Then enter text using keyboard. Press TAB to move focus out of the field and Rapise will capture SetText action.
Click on the ... button and then choose a value from the drop down table.
Rapise will capture Open action for the button and then ClickCell action for the value.
Basic rule is to record a click on a cell first. Then if the cell has a lookup table click on Open button. After recording the test must contain a cell click operation before any interaction with cell's value.
Here is the recording session that resulted in the RVL presented above.
Note: Since build 184.108.40.206 Rapise automatically scrolls tables horizontally during playback. This is to make a required column visible on screen.
Browser did not have enough time to initialize all controls after loading data from a server. This may happen of previous action of the test was navigation or AJAX operation. There are two ways to adjust the test.
1. Insert Global.DoWaitFor('objId') action before interacting with the control.
2. Or change test settings that define how many times Rapise tries to find an object during playback. E.g. set ObjectLookupAttempts to 30.
If you believe that the object is on screen but it can not be found on playback do additional check. Select the object in the object tree and do Flash.
If object is not found try to re-learn it (Re-Learn item in the same popup menu you used to Flash). If object is still not found copy it's XPath from Properties grid to clipboard and launch Web Spy.
In Spy paste XPath into the first field on the ribbon (highlighted) and press Test XPath button. Object will not be found. Adjust the XPath expression until Test XPath returns the only result. After that copy new XPath, close Spy and paste XPath expression into the Properties grid (in the field where you originally copied it to clipboard).
Selected files will be attached to any email sent on saving ticket.
Select files to upload
Or drag and drop files here
Save to upload the selected file(s)