Xpaths working on Chrome but not on Edge(Salesforce Lightening)

We are trying to automate Salesforce Lightening application using Selenium Webdriver. We have to click a span (Coming in autofill lookup). Code is working fine on Chrome but failing on Edge (Not able to find the element).

We have tried with following 4 xpaths. All are working on Chrome

 

  1. .//span[@class,’itemLabel slds-truncate slds-show–inline-block slds-m-left–xx-small’]
  2. .//lightning-icon[@class,’itemIcon slds-icon slds-icon–x-small slds-m-left–x-small slds-icon-text-default slds-button__icon slds-icon-utility-search slds-icon_container forceIcon’]
  3. .//div[@class,’searchButton itemContainer slds-lookup__item-action–label slds-text-link–reset slds-grid slds-grid–vertical-align-center slds-truncate forceSearchInputLookupDesktopActionItem lookup__header highlighted’]
  4. .//div[@data-aura-class,’forceSearchInputLookupDesktopActionItem’]

Anyone faced similar issue or has the solution for this, please help here.

 

Attached screenshot of screen and DOM structure.

Xpaths working on Chrome but not on Edge(Salesforce Lightening)Screen

Xpaths working on Chrome but not on Edge(Salesforce Lightening)DOM Structure

Default Asked on August 8, 2018 in Selenium WebDriver.
Add Comment
  • 1 Answer(s)

    can you try using thread.sleep(5000);

    or any other wait for EDGE and then give a try.

    Cheers

    Saket

    Train Answered on August 9, 2018.

    Thanks Saket

    But adding wait didn’t resolve the issue.

    on August 10, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.