RSAT and Selenium in action – Dynamics 365 for Finance & Operations Regression Test

Hi guys,
As you know, in order to handle the Regression Test in
F&O we can use RSAT.
Here a couple of links:

One of the RSAT limit is the integration part, so you cannot
use Task Recorder in order to recorder steps outside F&O.
The trick here is to use RSAT in combination with
Selenium, https://www.selenium.dev/
Below the steps:

Generate the Recording of the Web application integrated to F&O through Selenium:


Create the Recording:
ExportConvert the Recording in a C# unit test file:
The CS file will be looks like this:
// Generated by Selenium IDE
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Firefox;
using OpenQA.Selenium.Remote;
using OpenQA.Selenium.Support.UI;
using OpenQA.Selenium.Interactions;
using NUnit.Framework;
[TestFixture]
public class TEstTest {
  private IWebDriver driver;
  public IDictionary vars {get; private set;}
  private IJavaScriptExecutor js;
  [SetUp]
  public void SetUp() {
    driver = new ChromeDriver();
    js = (IJavaScriptExecutor)driver;
    vars = new Dictionary();
  }
  [TearDown]
  protected void TearDown() {
    driver.Quit();
  }
  [Test]
  public void Test() {
    // Test name: Test
    // Step # | name | target | value
    // 1 | open | /portale/web/guest | 
    driver.Navigate().GoToUrl(“https://www.xxxxxxx.it”);
    // 2 | setWindowSize | 1294×734 | 
    driver.Manage().Window.Size = new System.Drawing.Size(1294, 734);
    // 3 | click 
    driver.FindElement(By.LinkText(“XXXXX”)).Click();
    // 4 | click | css=p:nth-child(3) > a | 
    driver.FindElement(By.CssSelector(“p:nth-child(3) > a”)).Click();
    // 5 | close |  | 
    driver.Close();
  }
}
That said, will be enough to create an .NET C# class library with the above code.
Lastly, from X++, create a custom Menu in order to run from F&O the Selenium recording.
In order to achieve that, it’s simple to create a custom project that reference the C# Library create before and call the “Selenium code”.
Finally, with Task Recorder, walk through the custom menù in order to simulate the External Application like Customer Engagement, Transportation Management System, PLM, etc.
Conclusion

In this way we will have an unique Console in order to handle our Regression Tests between Microsoft Dynamics 365 F&O and other external applications and so avoid to use different products or manual interactions.
Till soon!

Original Post https://sinedax.blogspot.com/2020/03/rsat-and-selenium-in-action-dynamics.html

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
April 2025
MTWTFSS
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30     
« Mar   May »
Follow
Sign In/Sign Up Sidebar Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...