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
- .//span[@class,’itemLabel slds-truncate slds-show–inline-block slds-m-left–xx-small’]
- .//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’]
- .//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’]
Anyone faced similar issue or has the solution for this, please help here.
Attached screenshot of screen and DOM structure.