As we have to support multi-browser automated tests, the tests must run in both IE and Firefox.
After installing the latest build of WebAii we finally can work fine with both of them.
Still I suspect a funny problem with these browsers because they render non-breakable space ( ) in different manner.
Just have a look at this piece of HTML code:
But now, if I want to find this link by the text it contains, troubles appear.
Settings settings =
Manager manager =
Element element = manager.ActiveBrowser.Find.ByContent(
//null in both browsers, the desired way to find the element
Element element1 = manager.ActiveBrowser.Find.ByContent(
//null in IE
Element element2 = manager.ActiveBrowser.Find.ByContent(
//null in FF
//here fails IE
//here fails FF
You can switch the browser type right in the first line of the code.
The general trouble is that I cannot process this link in the same way in FF and IE.
The second problem is that the types of spaces in the text can change (so the appearance of the text would be the same, but spaces would be different).
So we need a way of finding elements on the page which will not depend on:
1) browser type
2) type of spaces used by developers.
It would be really good if there is such a way, because our tests use Find.ByContent very often.