Forum Discussion

sohailalam2696's avatar
sohailalam2696
Contributor
11 months ago

How to change the name of header of keyword?

 

In the above image, you can see all the elements are under TwentyFirstServices.

I have 3 envt, first is TwentyFirstServices, second is UATTwentyFirstServices. and third is DEVTwentyFirstServices.

I pass the envt variable and then username and password.

Now, when I change the envt level/navigate to UATTwentyFirstServices, it still shows the TwentyFirstServices as all the elements were recorded under TwentyFirstServices.

Is there a way to modify this pageLoginModifyTwentyFirstServices?

Thanks

Is there a way to modify that?

5 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Do you want those keyword test steps to work based on the environment you have selected via the variable you pass in?

    • sohailalam2696's avatar
      sohailalam2696
      Contributor

      Yes, and the variable are passing fine, the only problem is when I first recorded the test I used the page TwentyFirstServices, but when I changed the variable to UAT, navigate works fine and UATTwentyFirstServices opens but on step 3 it is still TwentyFirstServices.

      Thank you

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    You need to look at how your name mappings are defined.

     

    For example, the following name mapping defines the "button"

    the "button" belongs to this web page,

    However, the "button" also appears in other pages on the same website.

    Since the parent object of "button" has changed, TC won't be able to find the "button". However, if I use wildcard and define the parent as 

    Then it will work.

     

    I've describe something similar in your previous post, https://community.smartbear.com/t5/TestComplete-Questions/Variables-declarations-based-on-environment/td-p/259049

     

    • sohailalam2696's avatar
      sohailalam2696
      Contributor

      What if my parent url is prodconnect.com and uatconnect.com. Will the wildcard still works? Cuz the url has Prod and UAT upfront

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Have you read the documentation on wildcard, which I provided a link for?