Forum Discussion

Lagencie's avatar
Lagencie
Frequent Contributor
7 years ago
Solved

Overwrite Namemapping Configuration in Runtime

Is it possible to overwrite a mapped objects className within a script during runtime?

 

NameMapping.bla.element.this.className ="newClassName"

 

Sadly this doesnt work, it only overwrites the classname in the HTML document.

 

Is it possible to overwrite the className within the mapped objects NameMapping tree? 

 

I know there is a workaround with a project variable, which you can set during runtime and use it as namemapping, but I am curious if its possible to overwrite the configuration during runtime

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    No, you cannot do that.  As you noted, you can use a project variable, but there is no way to alter the values of the properties used for object identification otherwise.

     

  • Lagencie's avatar
    Lagencie
    Frequent Contributor

    googled the question and as the universe wanted it I came accross my own created post  years ago haha ...

    Is there already a possiblity?

    Because what we currently phase as a problem we have now version 35 and version 36 of our webui and in version 36 there is a completely new structure using https and a few other changes to the url generation at all. So we would need the option to test both our versions 35 and 36.

    Is it somehow possible to change the used namemapping after I started the test - So I can get the version from our UI and based on this version I want to use namemapping: Version 36+ or Version 35-

    Or if this is not explicitly possible how do other companies approach this? As I am sure we are not the only one phasing version changes in the namemapping and still having to test both namemappings