On 02/01/2009, Ray Trejo <[email protected]> wrote:
> Hi,
>
>  I am trying to click a link on a page with the text Test Process
>  Definition.  Is there a way to click a link using xpath or some sort of
>  regular expression?
>

Not directly.

Text can be extracted from an HTML page using XPath or RE, and the
result can be used in a sampler.

>
>  The below html is from the page source.
>
>
>
>  <a id="j_id14:processDefinitionList:15:processName" href="#"
>  onclick="if(typeof jsfcljs ==
>  'function'){jsfcljs(document.getElementById('j_id14'),'j_id14:processDef
>  initionList:15:processName,j_id14:processDefinitionList:15:processName',
>  '');}return false" class="latestVersion">
>
>                                                           Test Process
>  Definition</a>
>

The function jsfcljs() presumably does the work.

>
>  During execution of the thread I want to click this link to get to the
>  details of the next page.
>
>
>
>  When I use the recording controller, here is the information I get.
>
>
>
>  http request
>
>  post
>
>
>
>  send parameters with the request
>
>
>
>  name            value
>
>  j_id14:j_id22
>
>  j_id14:j_id24
>
>  j_id14                                                            j_id14
>
>  autoScroll
>
>  javax.faces.ViewState                                       j_id2
>
>  j_id14:processDefinitionList:15:processName
>  j_id14:processDefinitionList:15:processName
>

I cannot follow the above table - it's not clear what the values are.

I suggest you re-record the sample, and compare the parameters.

If any parameters or values vary between the tests, then those
variable parts will need to be replaced by JMeter variables - which
can be set up using XPath or RE Post-Processors applied to the
previous result.

>
>
>
>
>
>
>
>  Thank you,
>
>
>
>  Ray Trejo
>
>  Rackspace
>
>
>
>  Quality Assurance Engineer
>
>  Direct:  (210) 312 - 5326
>
>  Email:  [email protected] <mailto:[email protected]>
>
>
>
>
>
>  Confidentiality Notice: This e-mail message (including any attached or
>  embedded documents) is intended for the exclusive and confidential use of the
>  individual or entity to which this message is addressed, and unless otherwise
>  expressly indicated, is confidential and privileged information of Rackspace.
>  Any dissemination, distribution or copying of the enclosed material is 
> prohibited.
>  If you receive this transmission in error, please notify us immediately by 
> e-mail
>  at [email protected], and delete the original message.
>  Your cooperation is appreciated.
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to