Forum Discussion

okhan's avatar
okhan
New Contributor
14 years ago

Panel name keeps changing for an object button



  

Call page2.panelQvccontainer.panelMidcontentarea.panelMaincontent.form.table.cell.HoverMouse(480, 40)

Set cell = iexplore.pageQvcUkShopReviewOrder4.panelQvccontainer.panelMidcontentarea.panelMaincontent.form.table.cell

Call cell.HoverMouse(106, 66)

cell.imagebuttonComplete.Click

Call iexplore.pageHttpsWwwQvcukComUkqicQvcappA4.HoverMouse(960, 190)

 

When I record a test for purchasing an item through an e-commerce website, the replay is failing on the "Submit Order" button. The fail message is that it cant find the panel.



I now know that the reason behind this is that the panel name is changing everytime. It keeps incrementing the number of the panel name by 1 everytime a new order is placed.  



In this case the panel name is recorded as QvcUkShopReviewOrder4 and WwwQvcukComUkqicQvcappA4. If I run this test, it will look for QvcUkShopReviewOrder5 and WwwQvcukComUkqicQvcappA5 respectively.



Is there anyway around this problem? 

4 Replies


  • Hello,

     

      It looks like you misunderstood the solution and added an asterisk directly to your code. So, let me explain the solution in detail. 

      1. Locate the WwwQvcukComUkqicQvcappA4  object in the mapping tree (the Mapped Objects panel of the Name Mapping editor).

      2. Select the item.

      3. On the right side, click the property value that shows "WwwQvcukComUkqicQvcappA4" - the ellipsis button (...) will appear to the right of the value.

      4. Click the ellipsis button to open the value editor.

      5. In the dialog that opens, modify the property value in the "Value" box -  replace the last character with '*'.
  • okhan's avatar
    okhan
    New Contributor
    I get an error if I do that. It does not like the asterisk symbol
  • okhan's avatar
    okhan
    New Contributor
    Thank you very much Alex. That has done the trick!