Xiaomei Li wrote: > I just upgraded my HtmlUnit from 1.11 to 1.13 to > support a javascript enhancement of the web > application I am testing. However, my test script > doesn't work anymore on HtmlUnit 1.13. It fails on > > <clickElement > xpath="//a[text()='Protein']" /> > The log says no such element found. > > The page I am testing is > http://www.biohealthbase.org/GSearch/details.do?geneId=243751&decorator=Influenza > > Thanks, > Xiaomei
Hi, I guess that this is due to a wrong behavior of text() in HtmlUnit 1.11: it removed spaces. That was often handy but incorrect. Try this: //a[normalize-space(text()) = 'Protein'] This has the advantage to work in a browser too. Marc. -- Blog: http://mguillem.wordpress.com _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

