This question is locked. New answers and comments are not allowed.
Hello,
I am evaluating the WebAii framework.
I found and issue in xpath related to Internet Explorer.
I am trying to get a specific table. With firefox/firebug the xpath of that table is "/html/body/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr[3]/td[2]/table/tbody/tr[3]/td/table/tbody/tr/td/table". In internet explorer that xpath does not works. Returns a null object. I made a search and find out that internet explorer didn't use all the w3c standards for xpath (http://www.w3schools.com/xpath/xpath_syntax.asp).
It says:
"IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]"
On http://www.w3schools.com/xpath/xpath_examples.asp give us a workaround for this problem:
"A Workaround!
To solve the [0] and [1] problem in IE5+, you can set the SelectionLanguage to XPath.
The following example selects the title of the first book node under the bookstore element:
Example
xml.setProperty("SelectionLanguage","XPath");
xml.selectNodes("/bookstore/book[1]/title"); "
In WebAii, there is any workaround? Or should I do it in other way?
The table I want has no name or id. Can't change that. It is defined like this: <table cellspacing="0" cellpadding="2" border="0">.
EDIT: I am using browser.Find.ByXPath<HtmlControl>(xpath).
Best Regards,
Bruno Almeida
I am evaluating the WebAii framework.
I found and issue in xpath related to Internet Explorer.
I am trying to get a specific table. With firefox/firebug the xpath of that table is "/html/body/table/tbody/tr/td/table/tbody/tr/td/table/tbody/tr[3]/td[2]/table/tbody/tr[3]/td/table/tbody/tr/td/table". In internet explorer that xpath does not works. Returns a null object. I made a search and find out that internet explorer didn't use all the w3c standards for xpath (http://www.w3schools.com/xpath/xpath_syntax.asp).
It says:
"IE5 and later has implemented that [0] should be the first node, but according to the W3C standard it should have been [1]"
On http://www.w3schools.com/xpath/xpath_examples.asp give us a workaround for this problem:
"A Workaround!
To solve the [0] and [1] problem in IE5+, you can set the SelectionLanguage to XPath.
The following example selects the title of the first book node under the bookstore element:
Example
xml.setProperty("SelectionLanguage","XPath");
xml.selectNodes("/bookstore/book[1]/title"); "
In WebAii, there is any workaround? Or should I do it in other way?
The table I want has no name or id. Can't change that. It is defined like this: <table cellspacing="0" cellpadding="2" border="0">.
EDIT: I am using browser.Find.ByXPath<HtmlControl>(xpath).
Best Regards,
Bruno Almeida