XHTML elements loaded by AJAX-request become "x:" namespace prefix
------------------------------------------------------------------

                 Key: RF-7470
                 URL: https://jira.jboss.org/jira/browse/RF-7470
             Project: RichFaces
          Issue Type: Feature Request
          Components: core
    Affects Versions: 3.3.0
         Environment: Windows XP, Firefox 3.0.11, XPath Checker 0.4.1, Tomcat 
6.0.18, JDK 1.6.14, Mojarra JSF Implementation 1.2_12-b01-FCS
            Reporter: Vlad Kravchenko


We are using Richfaces in our application and test its UI with Selenium. Many 
test assertions are performed with XPath. 
The problem is that we have to use different XPath expressions for the "same" 
elements before and after the Ajax-request, because the elements reloaded by 
the Ajax-request apper in an "x" namespace. Before the request they could be 
only found without specifiing any namespace.

The issue can be observed on the Richfaces Live Demo. Go to the Data Iteration 
/ Data Grid Demo.
I am using XPath Checker Firefox plugin to get the XPath of an element.
The XPath to the price value of the first car on the first page: 
id('j_id355:j_id356:0:j_id357_body')/table/tbody/tr[1]/td[2]
Then I go to the next page and gets the XPath to the price value of the first 
car on that page: 
id('j_id355:j_id356:9:j_id357_body')/x:table/x:tbody/x:tr[1]/x:td[2]

You can see that table and its child elements are now in the "x" namespace. 

Could you explain that behavior? Can it be altered in some way?

It would make tests using XPath more robust if the elements created by 
AJAX-request could be found without x: prefix.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to