Search code examples
javascripttestingautomated-testsdynamics-crm

How do I automate form filling in MS Dynamics 365?


I am having a go at using javascript to fill in a form and then save it in hopes I can use these scripts to set up test data.

On Chrome, I tried to do the following to edit an existing account / submit a new account. I can confirm the elements are definitely correct because the browser highlights them.

document.querySelector('input[aria-label="Account Name"]').title='Test Company'
document.querySelector('input[aria-label="Account Name"]').value='Test Company'
document.querySelector('button[aria-label="Save"]').click()

I can see that the field name changes for the account name but hitting save fails. In the case of the edit account scenario, it reverts back to the old name. In the new account scenario, it doesn't save the account successfully.

UPDATE: I am trying to fire off the change event after I have amended a field, how do I do it?


Solution

  • For your requirement you can use EasyRepro Test automation tool for Dynamics CRM. check below article to get started. https://community.dynamics.com/crm/b/crminthefield/posts/test-automation-and-easyrepro-01---overview-and-getting-started

    Please mark my answer verified if i were helpful