Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
8 years ago

Cross Browser Testing / NameMapping issues

Good afternoon everybody...  I have a fairly extensive suite of keyword tests I created for IE that are finally running really well after a lot of learning (many thanks to you all in this forum!).  I have gotten to the point where I am ready to execute these in other browsers.  After attempting to run the tests in Chrome, I am running into instances where objects are not found in the NameMapping file, which is bringing the test to a halt.  I assumed the mapping would translate seamlessly, I guess.  Silly me. 

 

I know I can add "If Browser..." logic into my tests, and map all of the fields in the other browsers, but I was wondering if there was a better way?  There are several hundred objects to map and the namemapping file is unruly enough as it is.  I would much rather recreate the tests in a whole new suite with a whole new NameMapping file to run against Chrome, which may be my best option at this point.  Just wanted to see what some of you more experienced folks think. 

 

Going forward, is there a better way of creating tests to run across multiple browsers?  What should I do differently next time? 

 

Thanks!

Dave.

3 Replies

  • cunderw's avatar
    cunderw
    Community Hero

    Creating the tests in separate projects for multiple browsers would not be a good idea. If you need to update your test for any new functionality you now have to do it twice. 

     

    I have found that opposed to using name mapping for web testing, that Find methods (FindChild, FindChildEx, FindAllChildren) etc.. are much more reliable. Also, consider building a framework doing any non-verification steps as opposed to re-recording / writing those actions for each individual tests. Things like logging in or page navigation. Doing this will make maintenance of the tests A LOT easier. 

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Whats getting broken in your mapping properties?

       

      I've used mapped objects cross-browser without any trouble? I've also used helper/finder functions (such as suggested above).

       

      I found way more inconsistency in how the CSS layer translates between different browsers than I did with mapping properties.