question

candrews avatar image
candrews asked candrews posted

WEB GUI - Adding expression matching for file deletion when using drop down box

I have a drop down box that shows the firmware that my unit under test has loaded on it. Each week the revision level of this firmware will increase by one, so I want to create a test case that will go in and delete the previous weeks firmware image prior to loading the new firmware.  Here is the format of the firmware:

 

NV6310A-A2-04-07-E1.biz (Primary)

 

Ideally I would like to look for the "Primary" label and delete the fimware that has that criteria. I will settle for deleting a firmware image that has the beginning text of "NV6310A". 

 

Any suggestions would be appreciated.

iTestGUI Testing(Web-Java Swing-etc)
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

·
KumarS avatar image
KumarS answered KumarS posted

Are you deleting this firmware through the GUI or are you extracting information from the GUI and then deleting the image through Telnet or other sessions?

 

For extracting information from the Web GUI or any other GUI testing module, you can use "describe" action in your testcase on the control to get the contents of the control. You identify the control by using XPATH to that control. iTest can generate this automatically for you during capture if you "ctrl-right-click" in the browser on your control and select "describe" from the menu item. I am not completely sure about the key combination. You may also want to try "ctrl-shift-right-click".

 

Once you have this step in the testcase, you can extract that information by simply opening response view and selecting the string text which you want. You can then right click and add a rule to extract this information using a regex and then store the extracted data into a variable. iTest will automatically generate a regular expression for your image format.

 

Once you have that information in a variable, you can write specific steps which you probably know more about on how to delete that image. 

1 comment
10 |950

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

PreetS avatar image PreetS commented ·

If the name is the selected value of a combo box or any other standard control, then you can use the describe action as KumarS suggested. Just right click on the control and select 'describe'

If the value(s) are present elsewhere on your page then you can execute a 'snapshot' action.

 

From the responses above you can use regular expression to extract that names of the values you are interested in and then use them further on in your test case.  

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.