Forum Discussion

jsc's avatar
jsc
Regular Contributor
9 years ago

mapping elements automatically by script?

Hello all,

 

I have to start automating another plugin of our software.

 

I normally start by building the namemapping from scratch by mapping all needed elements manually.

This is quite boring and time consuming, but a really solid namemapping is the fundament for our quite robust tests.

 

So I thought about doing a greater part of this automatically.

Is it possible to add all visible elements (in a webpage) automatically to an existing (or empty) namemapping by script?

 

Afterwards I will have to go through the elements and remove the unneeded ones or check the criteria for recognition.

 

Any help is welcome!

Best regards,

Joachim

 

 

7 Replies

  • jsc's avatar
    jsc
    Regular Contributor

    Is there no useful possibility to map all elements automatically and check them afterwards manually?

    I think this would be fast as manually mapping all the elements.

    • william_roe's avatar
      william_roe
      Super Contributor

      jsc wrote:

      Is there no useful possibility to map all elements automatically and check them afterwards manually?

      I think this would be fast as manually mapping all the elements.


      You might be able to get 80% there with automatic mapping. For our SPA (single page application) applacation the Frames are the key element to map ahead of time and put wildcards in the appropriate place(s). 

       

      I will NEVER AGAIN use extended find. I can't tell you how much time this "feature" has cost. YMMV

       

      Manual mapping isn't all that tedious but we may give auto mapping another go of it now that we understand it better.

      • jsc's avatar
        jsc
        Regular Contributor

        william_roe wrote:

        You might be able to get 80% there with automatic mapping. For our SPA (single page application) applacation the Frames are the key element to map ahead of time and put wildcards in the appropriate place(s). I would be willing to go fully automatic if renaming worked better. I've found when renaming mapped objects that property checkpoints don't get updated. 

         

        I will NEVER AGAIN use extended find. I can't tell you how much time this "feature" has cost. YMMV


        I am not sure, if I understand you correctly.

         

        1. Did you map the elements via script? e.g. opening the page whose elements should be mapped and then started some script, that mapped all the elements to the namemapping file?

         

        2. what problems with extended find did you have? We could not live without it... The namemapping must be horrible without it! It is sometimes slow but the test is really readable.