question

twile avatar image
twile asked twile posted

Dynamic Population of Command drop-down

I've been looking for where to add support for the 'Command' field drop-down for a plugin's Actions.

 

Similar to how the default 'eval' Action will show a drop-down of all the possible commands and then tooltip help for how to use that command once the command is uniquely identified.

 

How does that work, do tool plugins have access to that?

iTestsdk
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
tlawall avatar image
tlawall answered tlawall posted

 

 


twile wrote:

I've been looking for where to add support for the 'Command' field drop-down for a plugin's Actions.

 

Similar to how the default 'eval' Action will show a drop-down of all the possible commands and then tooltip help for how to use that command once the command is uniquely identified.

 

How does that work, do tool plugins have access to that?


 

If I'm correct, I think you want to look in the plugin.xml.  This is where you specify what "actions" are available to use on whatever type of session you're creating.  It's here that you also provide a name of a file to use for the popup help when that particular action is selected.  See my example below:

 

<plugin>
   <extension
         point="com.fnfr.open.automation.tool">
      <tool
            id="com.example.iTest.XMLGen2"
            name="XMLGen2">
         <open
               handler="com.example.itest.xmlgen2.request.handlers.OpenRequestHandler"
               nextAction="add"
               openNewWindow="true"
               sessionFactory="com.example.itest.xmlgen2.XMLGen2SessionFactory">
         </open>
         <request
               action="add"
               handler="com.example.itest.xmlgen2.request.handlers.AddRequestHandler"
               help="popup_help/add.html">
         </request>
         <request
               action="generate"
               allowAutoMapResponse="false"
               handler="com.example.itest.xmlgen2.request.handlers.GenerateRequestHandler"
               nextAction="close"
               help="popup_help/generate.html">
         </request>
         <close
               nextAction="open">
         </close>
      </tool>
   </extension>
</plugin>

 

The green text is the action that you're creating.  The blue text is the class to call when the action is invoked from a test case, and the red text is what help file to use to populate the popup for this particular action.

 

In this example, I have my html files located in a folder in the top level of the project called "popup_help".  Take a look at the structure of the network tool SDK sample they give, and you'll see the same is mirrored there.

 

Does this answer your question?

3 comments
10 |950

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

AdamB avatar image AdamB commented ·

We don't currently have the ability to add commands to the command drop down from tools, this is an enhancement that we are looking at making.

0 Likes 0 ·
tlawall avatar image tlawall commented ·

On reading this again, I realized I completely missed the context. He's asking if he can customize the dropdown tool tip for the "Description" field of a given plugin action.  If that's the case,  then yes, I'd like to know that as well, if/when it gets implemented. 

0 Likes 0 ·
AdamB avatar image AdamB tlawall commented ·

We will repost here with SDK updates as we make them.  We would also love to hear any other parts tht have been easy or frustrating.  Feel free to either post here, or send this feedback back through AEs/Sales/Ameya.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.