Hi,
I have the following snippet of html;
I want to capture the text between the <br> tags as separate elements so that I can prove the string has been broken up correctly.
I can use this XPATH to identify the text items; //div[@class='content']//div[@id='offer_terms']/p/br/preceding-sibling::text()
However I can not this in FindElements as it throws this error;
findElements execution failed;
The result of the xpath expression "//div[@class='content']//div[@id='offer_terms']/p/br/preceding-sibling::text()" is: [object Text]. It should be an element. (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 25 milliseconds
Build info: version: '2.25.0', revision: '17482', time: '2012-07-18 21:08:56'
System info:
os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.7.0_07'
Driver info: driver.version: EventFiringWebDriver
Session ID: 9c3726770e6dcfd11a32e8c529fa3bbf
I understand why the error is thrown but cannot think of anyway to grab this text and assert that the <br> are in the right place.
Thanks
Robbie