I have this issue with my AUT whereby the inner text value of a certain element contains a whitespace character that I am unable to account for in my tests.
The following is an example of the code used to produce the RanoreXpath for the element:
Code: Select all
DivTag divValue = Repository.VosDomXpath + "//div[@id~'dropdown']//div[@innertext='" + value + "']";
Code: Select all
/dom[@domain='46.51.166.61']//div[@id~'dropdown']//div[@innertext='Next Week']
Why were these seemingly identical RanoreXpaths yielding different results?
To find out, I popped them both in notepad++ and used the 'Show All Characters' button (the one that reveals carriage return and whitespace characters) to see if there was any difference. At first there was not, however when I changed the character encoding from ANSI to UTF-8, notepad++ revealed this wierd whitespace character inbetween 'Next' and 'Week'. A screenshot of notepad++ revealing this is attached.
This character is obviously being produced by the AUT. With that in mind, How do I account for this? I need to pass in different values on the fly i.e. I cannot hard code this whitespace character in my tests...
Cheers in advance.