Xpath is not identified in IE browser

Hi All,

I am trying to execute below code in internet explorer.It throws an error saying the xpath= “//*[contains(@id,‘qrcodelink’)]")” cannot be found,(when I try to debug the code,it doesnt throw any error.Tried using verifyElementPresent/verifyElementVisible/WebUI.delay , but no use) .This works fine in Chrome and FF.

if (driver.findElement(By.xpath("//*[contains(@id,‘qrcodelink’)]")).isDisplayed())
{
//some code
} else {
//some code
}

PLEASE HELP!!

@Russ_Thomas can you pls help with this issue

Word of warning - I’m NOT an xpath guru.

What version of IE?

Aside: Read this:

Hello @Russ_Thomas!

Its IE11. Now the new issue I am facing is its not able to identify below customKeyword created:
I 've used delay/implicit wait/explicit wait but nothing works :frowning:

CustomKeywords.‘com.sfqa_Package.LoginPage.Login’(findTestData(‘LoginPage/LoginPage’).getValue(‘SingPassID’, 5), findTestData(
‘LoginPage/LoginPage’).getValue(‘Password’, 1))

That’s a completely different question. Please ask ONE question in ONE Topic - post that question in a new topic please.

Thanks

@akshada.shetty : Pls check the below article

IE doesn’t have a native XPath engine for finding elements. So to be able to find elements by XPath in IE, we have to use a JavaScript XPath query engine. That’s going to be slower than doing the same thing in other browsers. This is the biggest reason why I recommend using CSS selectors instead of XPath for finding elements.

1 Like

thank you @discover.selenium …I will surely try using css selector and check again