0

I have automated classis view in salesforce but in lightning view same elements are not recognizable by selenium webdriver. VF embedded controls are not recognizable in lightning mode

0

Selenium logic is very fragile as it is usually based on small details of the HTML.

A Visualforce page rendered in "Classic" has header and sidebar HTML added and is rendered as the root html element. A Visualforce page rendered in "Lightning Experience" doesn't have the header and sidebar HTML added and is rendered in an iframe contained in the root html element:

...
<iframe class="" frameborder="0" width="100%" name="vfFrameId_1501838247943" height="100%" id="vfFrameId_1501838247943" scrolling="yes" data-aura-rendered-by="3029:0" allowfullscreen="true">
    <html class>
        ...
    </html>
</iframe>
...

Other changes are also made by the platform to keep the Visualforce working in the considerably different "Lightning Experience" world such as URLs modified to e.g.:

href="/one/one.app#/alohaRedirecthttps://na40.salesforce.com/00346000002HUvw?isdtp=p1" id="lookup00346000002HUvw00N46000002KngV"

Modifying your Selenium logic to work for both modes is a significant job event if the logic is well structured; if the logic was created by e.g. recording you will probably need to completely re-create it.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.