Forum Discussion

DipakGudge's avatar
DipakGudge
Occasional Visitor
5 years ago
Solved

Needed a Regular Expression releted help

Hey guys,

 

i have a line like below

 

"var referenceDial3=Aliases.OpenSiteDesigner.wndMStnChild3;"

 

and the value "3" is a number which is always keeps changing, rest remains same,

i want that number to be any number...

so is there any regular expression which might help?

  • Hi,

     

    i have a line like below

    Is the line a string indeed or this is a regular line of code that assigns a value to the variable and you enclosed it in quotes just for the sake of readability?

    For now I assume the latter.

     

    and the value "3" is a number which is always keeps changing

    I assume that you meant "3" for wndMStnChild3, not for referenceDial3.

     

    Do you have automatic NameMapping for your project turned on (Tools|Options|Engines|Name Mapping->Map object names automatically) ?

    If yes, can you let us know how wndMStnChild3 (and also wndMStnChild, wndMStnChild1, wndMStnChild2) are mapped in the NameMapping editor?

     

    Assuming I was correct with all my guesses for above, I would recommend you to make NameMapping identification parameters for the wndMStnChild control to be unique and stable to stop TestComplete to try to create new mappings for the same control.

     

    P.S. https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ webinar from the https://support.smartbear.com/screencasts/testcomplete/ page might appear to be useful.

     

2 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    i have a line like below

    Is the line a string indeed or this is a regular line of code that assigns a value to the variable and you enclosed it in quotes just for the sake of readability?

    For now I assume the latter.

     

    and the value "3" is a number which is always keeps changing

    I assume that you meant "3" for wndMStnChild3, not for referenceDial3.

     

    Do you have automatic NameMapping for your project turned on (Tools|Options|Engines|Name Mapping->Map object names automatically) ?

    If yes, can you let us know how wndMStnChild3 (and also wndMStnChild, wndMStnChild1, wndMStnChild2) are mapped in the NameMapping editor?

     

    Assuming I was correct with all my guesses for above, I would recommend you to make NameMapping identification parameters for the wndMStnChild control to be unique and stable to stop TestComplete to try to create new mappings for the same control.

     

    P.S. https://support.smartbear.com/screencasts/testcomplete/reliable-tests-for-dynamic-objects/ webinar from the https://support.smartbear.com/screencasts/testcomplete/ page might appear to be useful.

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you Alex!

       

      Hi DipakGudge, have you tried Alex's suggestions? Please let us know.