I am trying to set up automated testing for our Zendesk platform using TestCafé, but I am running into difficulties. I have written a simple test that navigates to the Zendesk login page and enters a username and password, but the test is failing.
Here is my code:
import { Selector } from 'testcafe';
fixture `Zendesk Login Test`
.page('https://mycompany.zendesk.com/');
test('Login to Zendesk', async t => {
const usernameInput = Selector('#username');
const passwordInput = Selector('#password');
const submitButton = Selector('#submit');
await t
.typeText(usernameInput, 'user@example.com')
.typeText(passwordInput, 'password123')
.click(submitButton);
});
The test fails with the error message: "Cannot find the specified element." I suspect that this is because the selectors I am using to locate the username, password, and submit inputs are incorrect. I need to inspect the Zendesk HTML and modify my selectors accordingly to get this test to pass. Also, I need to make a custom event to AWS EventBridge, and then send it through API Destinations to Zendesk CRM as explained here but I couldn't do it, can someone help me?