Forum Discussion

terwayo's avatar
terwayo
Occasional Contributor
8 years ago

Does TestComplete support Lightning by Salesforce?

Hi ,

 

When I run Test Complete 10 automated test scripts on lightning, the text fields are filled out but cleared when the save button is clicked then a validation message is displayed to enter fields. In another case, there is an input that is not cleared but a validation message to fill out the text field that already has a value each time the save button is clicked until the field is manually reentered before the form can be saved.

 

Thanks.

 

Regards

Debbie

 

 

  • Hi Debbie,

     

    It is not easy to suggest something useful without seeing at least how tested web page is recognized in TestComplete's Object Browser.

    But my first and the strongest recommendation will be to use XPath for the object's identification as little as possible and only as a last resort in cases when some object on the page is skipped by TestComplete but for some reason you must find it. (For example, an empty DIV section.)

    XPAth is the slowest (up to 30 times slower as per my quick measurements, but usually XPath is 6-9 times slower), case-sensitive and very inconvenient way of object identification in TestComplete when compared to the native functionality provided by TestComplete (Name-mapping, Aliases and FindXXX() methods). As for the cases with the mentioned empty div, usually this is a result of extremely poor page design... and yes, might be the only workable approach if you happen to participate in such project without any chance to make stable identifiers to be assigned to, at least, the key elements on the page.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    AlexKaras has an excellent response so, yes, it is supported.

     

    The problem you're experiencing, though, appears to be related to how the controls trigger saving their code.  There may be an "onExit" event that is triggered on those controls so that, if you use the "SetText" method to fill in the data, it MIGHT not trigger.  I would suggest, as a trial, if you're using "SetText" to change them all to "Keys" method calls and add the '[Enter]' string to the end of each set.  

    • terwayo's avatar
      terwayo
      Occasional Contributor

      Hi @AlexKaras 

      thanks for your response.

      I actually tried both the property "value" which is pretty much like "SetText" and also used "Keys".

      These methods of input (SetText & Keys) both fail if i use locator strings to identify each text box or drop down using "findChildByXPath", but saves when using "keys" to tab through the form and enter values. The problem is tabbing through the page is not readable and not very helpful to test or trace a defect to a field.

       

      I would appreciate any more advise.

       

      Thanks again.

       

      Debbie

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi Debbie,

         

        It is not easy to suggest something useful without seeing at least how tested web page is recognized in TestComplete's Object Browser.

        But my first and the strongest recommendation will be to use XPath for the object's identification as little as possible and only as a last resort in cases when some object on the page is skipped by TestComplete but for some reason you must find it. (For example, an empty DIV section.)

        XPAth is the slowest (up to 30 times slower as per my quick measurements, but usually XPath is 6-9 times slower), case-sensitive and very inconvenient way of object identification in TestComplete when compared to the native functionality provided by TestComplete (Name-mapping, Aliases and FindXXX() methods). As for the cases with the mentioned empty div, usually this is a result of extremely poor page design... and yes, might be the only workable approach if you happen to participate in such project without any chance to make stable identifiers to be assigned to, at least, the key elements on the page.