Forum Discussion

jkrier's avatar
jkrier
Regular Contributor
13 years ago

How to use selectXPath

Hello,

Can anyone help me with using the method selectXPath in UISupport? What I am trying to accomplish is to display a list of results so a user can select the desired result from the message response.

I've tried this

ui = com.eviware.soapui.support.UISupport
rc = ui.selectXPath("Account Types", " Please select one", "<getAccountTypes#Response", "getAccountTypesResponse[1]")

1 Reply

  • Hi,
    The support for custom Groovy script is out of the scope of support agreement.
    Having said that, I think selectXPath() is not the good choice to present the user with multiple values for selection, from the response.
    You need to parse the response in the Groovy script and create the the list of options.
    You can refer following post on how to parse response: http://www.robert-nemet.com/2011/11/gro ... oapui.html

    Once you have the list of options then use: com.eviware.soapui.support.UISupport.getDialogs().prompt( String question, String title, Object[] options ) to show a dialog for selection.

    I hope this helps.

    Best Regards,
    Prakash
    SmartBear Sweden