0

I am trying to automate Salesforce using Selenium WebDriver and so far I have faced many challenges and also overcame after following the suggestions provided in the community.

Here, I am facing a very tough situation while 'Adding products to an existing Quote'. Steps:

  1. Search for an existing Quote - Completed
  2. Click on 'Edit Lines' - Completed
  3. Add Products - After 'Inspect Element', it shows as 'paper-button'. Firefox/Chrome can validate this WebElement in Classic mode but not in Lightning Experience.

$x("//paper-button[contains(text(),'Add Products')]") - This is locating 'Add Products' element ONLY in Classic mode. Do I need to ask the developer to make any tweak at the backend?

Can anyone help me how to handle this?

1 Answer 1

1

DOM Inspection tests are not supported by Salesforce. This is made official in the release notes for Spring '19.

This is not a change in Spring ’19, as we’ve never supported HTML, CSS and the DOM as a public API.

Salesforce recommend the following:

We recommend writing unit tests for Aura components and Lightning web components.

For Aura components, use Lightning Testing Service to write automated tests to ensure your components perform as expected. Lightning Testing Service supports testing with standard JavaScript test frameworks. It provides easy-to-use wrappers for using Jasmine and Mocha.

For Lightning web components, use Jest to write automated tests.

I am not aware of an official recommendation for VisualForce

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .