Forum Discussion

kaiiii's avatar
kaiiii
Regular Contributor
5 years ago
Solved

How can we manage a value that is getting change after every journey.

I am trying to handle an object whose radioButton value is getting changed every time. Please check below, where highlighted value is getting changed every time. Set Cart1 = page.Panel(3).Panel...
  • Wamboo's avatar
    5 years ago

    Hi

     

    In JavaScript you can write an anonymous function in a variable and in it use the function .findxxx() which you will get the value.

     

    I don't know how it will be in VB but there is a way to do it.

     

    Just when you run the script TestComplete will not look for this object with the value "4ad0f830" but will find it dynamically.

     

    Use find with regular expression which means find all characters after "budgetpay_com_lc_facade_order_data_LCOrderEntryData_XXX".

     

    Doc:
    https://support.smartbear.com/testcomplete/docs/reference/misc/regular-expressions.html

    An example of a call with the find() method:

     

    Example for find function with regular expression:

     

    obj.FindAll(["Top", "Text"], [px, "regexp:^[0-9]+$"], 2);