Forum Discussion

peter_rooms's avatar
peter_rooms
New Contributor
12 years ago

Evaluating TestComplete question about cross-browser testing

Hi,



I'm evaluating Testcomplete as test automation tool for our product in development.

We will use a web based tool using HTML5 and it has to be tested cross-browser.



Now I just wanted to navigate to a simple HTML 5 page and alter something on the page to see how testcomplete behaves and encounterd this strange thing.



The test page I used is : http://html5demos.com/contenteditable



The steps I take are

1) open the browser

2) navigate to the page

3) edit the content

4) hit the "Clear changes" button



When I first recorded the page in IE 11 and again in Chrome 32 (have all patches applied) I noticed the scripts were different. So I went on investigating what the differences were and came up with this.



The object mapping was different !!

1) IE mapped all objects on the page where Chrome stopped on the "wrapper" section. I could manually have the child objects mapped to all levels tho, but this is not the way I like it. I expect all objects to be mapped automatically, so I can run my scripts cross browser by only changing the browser. bacause of the non mapping in chrome this will not be possible.

(see attached image)



2) the mapping in itself had different names : (see attached images)

The maping in IE was like :

Aliases.browser.pageHtml5DemoContenteditable.sectionWrapper

The mapping in Chrome was : "Aliases.chrome.pageHtml5demosComContenteditable.sectionWrapper"



You can notice the difference for the same object. This will result in objects not being recognised when running scripts cross browser.



Is there a way to resolve these problems ?

3 Replies

  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Hi Peter,


    You might want to look into Name Mapping Configuration.



    In each configuration the Mapped Object would point to Aliases that are the same between configurations. The code would then refer to the Aliases.



    Configuration IE:

    Sys.Explorer.pageHtml5DemoContenteditable.sectionWrapper -> Aliases.Browser.SectionWrapper



    Configuration Chrome:

    Sys.Chrome.pageHtml5demosComContenteditable.sectionWrapper -> Aliases.Browser.SectionWrapper




    Sincerely

  • Dear Simon,



    your answer does not make it clear for me.



    Your answer might give a solution to the second problem where the names used in the Mapped objects can be different in configurations (in this case browsers) and then by using aliases testcomplete would be able to have a  playback in each browser.



    But then the fisrt issue becomes more importantn and that is where I started from. When recordign the page in Chrome the objects are not all mapped. The objects are only mapped on a higher level, while in IE they are mapped much deeper.



    So even with aliasses the script recorded in IE will not play in chrome as the object mapper just does not have the objects mapped. (and this is how I at first found out there is a problem)



    On the other hand my approach here could be wrong ? 



    So how would you tackle this issue.

    Take the website from my example and record the steps as described.

    Then you have to make it working cross browser.

    I hope you are able to explain this browser independant (meaning I can start with any browser I like)



  • simon_glet's avatar
    simon_glet
    Regular Contributor
    Peter,



    The latest Chrome release has been a pain for all TestComplete users. From reading this forum. the best solution seems to dowgrade Chrome to an officially supported version and block its automatic update. Check it out here to find links on how to do it.



    In any case, we only use recordings as an investigation tool to help us code our scripts.



    Sincerely