-1

Using Atata version 1.14, I am attempting to fill out a form as a smoke test for integration between Salesforce and Clustdoc. The problem is that the elements are returning a "Unable to locate visible element" or fails to preform the click and fails on a subsequent step. This happens with every single element I have tired on the page so far.

Here is an image of the HTML, code, and the failure.

HTML

Code

Error Code example 1

Error Code example 2

For addition context of what I have tried. The behavior is different when attempting to click on the element using Clickable instead of a different component type or using ClickUsingActions and/or ClickUsingScript The result is no error pops up but it also fails to click on the element thus failing on a subsequent step.

I have attempted other locator strategies such as CSS and absolute Xpath and variations but to no avail, most often failing in the same as listed above. From looking deeper into the issue, it appears to so far, only occur on pages or page elements using the new Lightniging framework (https://developer.salesforce.com/docs/atlas.en-us.lightning.meta/lightning/intro_framework.htm).

I am wondering if anyone else is running automation tests against salesforce using atata, and have had similar issues with interacting on their pages. If so do you know any potential fixes. I have looked at options like UTAM as well but would like to continue using Atata and selenium since we have a large integrated system for our automation set up.

  • Does https://stackoverflow.com/a/66465183/313628 or https://stackoverflow.com/a/74675210/313628 help? (Shameless plugs) – eyescream Jan 26 '23 at 18:37

1 Answers1

0

I would distinguish two problems and solve them one after another: elements finding, clicking.

Please also ensure that elements you are finding are not in Shadow DOM. If they are, then please take a look at https://github.com/atata-framework/atata/issues/360, which shows how to handle that.

Finding

Your link components with attributes in the page object can be simplified. You can replace [FindByXPath] to [FindByContent] and use Link instead of Clickable (as it is <a> tag):

[FindByContent("Home")]
// Or: [FindByContent(TermMatch.Contains, "Home")]
public Link<_> HomeTab { get; private set; }

[FindByContent("e-Onboarding Applications")]
// Or: [FindByContent(TermMatch.Contains, "e-Onboarding Applications")]
public Link<_> OnboardingTab { get; private set; }

[FindByContent("New")]
// Or: [FindByContent(TermMatch.Contains, "New")]
public Link<_> CreateNew { get; private set; }

Clicking

For clicking issue, please, after solving the finding problem, provide an example of failure: a piece of exact HTML, corresponding page object's property, Atata's trace log, exception if occurs. Can be perfect if you'll be able to reproduce your issue for the similar component on some publicly available Salesforce page.

Yevgeniy Shunevych
  • 1,136
  • 6
  • 11