I am trying to get a value(Identifier in my case) from XML to pull some logic rules for a web app. I have managed to get my JavaScript to work on Firefox & Chrome but for Edge, instead of picking an element(Identifier) it's picking an element description from Developers tool.
Test case is:
1. Get an identifier from .XML
2. Go to an application and search using that identifier
For example: .XML
<Application Type="ABCD">
<Identifier>18753</Identifier>
<SalesChannel SalesChannelType="PQRS" SalesChannelSegment="XYZ">
<Identifier>AB1234</Identifier>
My code for this:
driver.get("URL for .XML");
Assert.assertTrue(driver.getPageSource().contains("Identifier"));
String xml = driver.getPageSource();
String appID = xml.split("<Identifier>")[1].split("</Identifier>")[0];
**Code to navigate to web app **
driver.findElement(By.id("oData")).sendKeys(appID);
--It uses appID and proceed with an application.
But instead of picking an identifier which is "18753" in this case, it's picking below value and putting in Search :
{{a xmlns="http://www.w3.org/1999/xhtml" tabindex="-1" role="treeitem" aria-expanded="true" aria-posinset="1" aria-setsize="20" aria-level="2" style="color: blue; margin-left: -2em;"><Identifier>18754</Identifier>
After investigation i found this value is coming from developer tool: