I tried your suggestion and for some reason its still not firing the js. Here is the excerpt from the log
[clickButton] INFO (com.canoo.webtest.steps.request.ClickButton) - -> findTarget(by input): name=cmdSearch value=Search [clickButton] INFO (com.canoo.webtest.engine.WebClientContext) - Content of window changed to http://rmsupport.xxx/PSLookup/_JOBCD_SearchResults.cfm?pLookupId=JOBCD&p01=76(text/html) [clickButton] INFO (com.canoo.webtest.engine.WebClientContext) - Content of window changed without javascript, it will become current response [clickButton] INFO (com.canoo.webtest.engine.WebClientContext) - Current form set to none [clickButton] INFO (com.canoo.webtest.engine.WebClientContext) - Current response now: http://rmsupport.xxxx/PSLo okup/_JOBCD_SearchResults.cfm?pLookupId=JOBCD&p01=76 [verifyXPath] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: verifyXPath "Verify grid results" (55/211) [clickElement] INFO (com.canoo.webtest.steps.Step) - >>>> Start Step: clickElement "Data grid results" (56/211) Thanks On Fri, Sep 11, 2009 at 10:19 AM, Soula, William <[email protected]>wrote: > If you have to do it by the table data try this: > //t...@class='cSearchResultsR1B1' and contains(text(),'Analog')]/parent::* > > That should work and kick off your javascript. I always prefer to put what > element im looking for after the "//" so its less confusing to me. > > If you can do it by the row then you wouldn't have to use the axis I used. > > -------------------------------------------------------- > > > Hi > > Thanks for the response and yes, xpath returns a TD element. When i click > it manually on the table, it appears to be a link but clickLink cannot find > it. Please advice if there is a better way to it. I have attached the js. > > Thanks again > -Rhee > > On Fri, Sep 11, 2009 at 9:30 AM, Soula, William <[email protected]> > wrote: > The onclick is on the tr element and you are telling webtest to click the > td element? > -------------------------------------------------------- > > > clickElement not executing onClick JS code onClick="parent.SaveForm('Y', > '546', 'Analog') > > ----------------------------------------------------------------------------------------- > > Key: WT-538 > URL: http://webtest-community.canoo.com/jira/browse/WT-538 > Project: WebTest > Type: Bug > > Versions: 3.0 > Environment: XP Pro > Canoo Webtest (R_1781) > Tried w/ HTMLUnit 2.6 and the latest 2.7 snap shot ( build.1590 09/10/2009 > 11:18:12) and got the same results > > Reporter: Rhee K Kgopolo > Attachments: JsScriptGridResult.txt, Scripts.js > > Webtest fails to click by element a resulting js > onClick="parent.SaveForm('Y', '546', 'Analog')" to return to the main page. > ClickElement reports success but the page does not return to the parent > page. See attached script, htmp page and the js. > > <verifyXPath xpath="//*...@class='cSearchResultsR1B1' and > contains(text(),'Analog')]" > description="Verify grid results"/> > <clickElement XPath ="//*...@class='cSearchResultsR1B1' and > contains(text(),'Analog')]" > description="Data grid results" /> > > <table border="0" cellpadding="0" cellspacing="0" width="100%"> > <col style="cursor:hand; padding-left:2px"> > <tr onClick="parent.SaveForm('Y', '546', 'Analog')" > onMouseOver="SetPSLookupRowBGColor(this)" > onMouseOut="SetPSLookupRowBGColor(this)"> > <td class="cSearchResultsR1B1">Analog</td> > </tr> > </table> > > -- > This message is automatically generated by JIRA. > - > If you think it was sent incorrectly contact one of the administrators: > http://webtest-community.canoo.com/jira/secure/Administrators.jspa > - > For more information on JIRA, see: > http://www.atlassian.com/software/jira > > _______________________________________________ > WebTest mailing list > [email protected] > http://lists.canoo.com/mailman/listinfo/webtest > > > > -- > - Rhee > > "Risk nothing and you gain nothing" > -- - Rhee "Risk nothing and you gain nothing"

