cancel
Showing results for 
Search instead for 
Did you mean: 

Recording tests creates duplicate browser mapping

SOLVED
BrianSmart
New Contributor

Recording tests creates duplicate browser mapping

When I go to record a script test, the browser that I'm using is mapped again, and then it proceeds to map all of the objects that I have already mapped. Running my tests uses the first mapping of my browser perfectly, I don't know why it's doing this, but it's ruining my name mapping.

1 ACCEPTED SOLUTION

Accepted Solutions
ebarbera
Staff

Re: Recording tests creates duplicate browser mapping

Hi @BrianSmart - 

 

I would recommend removing the full name property from the original browser mapping. The full name property makes the objects specific to edge which is probably what is causing the tool to repeat the mapping. It is better to have a generic mapping just using ObjectType browser like the second mapping shows.  

 

Let me know if you have questions. 


Emma

View solution in original post

5 REPLIES 5
Marsha_R
Community Hero

Re: Recording tests creates duplicate browser mapping

Is this happening on different machines or on different browsers?  Let's see a screenshot of your name mapping with some of the duplicates.

jr348
Contributor

Re: Recording tests creates duplicate browser mapping

Look at the point where they split from a common parent then use wildcards and/or remove some of the properties that might be different when the page opens next time. 

 

Many web frameworks such as REACT use one-off class names for example:

 

Username_TextBox_21837_hgggh33ezr4

 

This would be mapped as Username_TextBox_*

BrianSmart
New Contributor

Re: Recording tests creates duplicate browser mapping

This is happening on the same machine using the same browser each time (MS Edge)

 

Here's the original mapped browser

browsermap.png

Here's the duplicate created when recording tests: 

browser2map.png

Here's the properties of the original mapped browser:

browserMapProps.png

Here's the properties for the duplicate mapped browser:

browser2mapProps.png

ebarbera
Staff

Re: Recording tests creates duplicate browser mapping

Hi @BrianSmart - 

 

I would recommend removing the full name property from the original browser mapping. The full name property makes the objects specific to edge which is probably what is causing the tool to repeat the mapping. It is better to have a generic mapping just using ObjectType browser like the second mapping shows.  

 

Let me know if you have questions. 


Emma

View solution in original post

BrianSmart
New Contributor

Re: Recording tests creates duplicate browser mapping

I believe I had tried this before with no success, but I tried it again and it worked, so perhaps some combination of an update and this change.

The reason I identified the browser more clearly in the mapping is because I have two versions of MS Edge on my machine, and I need to ensure the tests that I'm running against are using the correct version of Edge. I think I had originally put the version in the mapping as well, and removed it while trying to figure this issue out.

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors