Ask a Question

unable to put all my IE8 mappings under one process IExplore

tverma
Occasional Contributor

unable to put all my IE8 mappings under one process IExplore

Hello,



Since IE8 is a multi process thread, I have noticed that whenever I map any new feature in my web based application, it has a different index number, and it creates a separate entry in my namemapping file. Is there a way I can get rid of indexes? and eveytime I map an object in IE, it automatically falls under single process IExplore, as it does for firefox?



currently I my namemapping file has many instances of IExplore, and want to know if there is a way of getting all my mapping of IE under single IE process.
5 REPLIES 5
Pavel_1
Contributor

Hi,

IE 8 creates a separate process for each page, iexplore process with index 1 holds all of them but you can't access page elements normally from there (1st page can be accessed from iexplore 2, 2nd under iexplore 3 and so on).

I solved such problem by creating a function which returns iexplore process object with biggest index, and then using it everytime when new page is opened in scripts.

It would be nice to know if there are better solutions.

AlexKaras
Community Hero

Hi,



Have a look at these articles which may appear to help:

http://www.automatedqa.com/techpapers/testcomplete/tabbed-browsing.aspx

http://www.automatedqa.com/techpapers/testcomplete/cross-browser-testing/
Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
tverma
Occasional Contributor

Thanks Pavel for ur reply. I would like to know how u find the biggest index? it would be great if u can share with me the function that u wrote.



Thanks,

Tina Verma
tverma
Occasional Contributor

Thanks Alexei, for responding to my post,  I went through these links, and unfortunately they don't seem to provide specific information on the my namemapping issue with IE8.



It would be nice if AQA provides some more guidance specific to this namemapping issue. Are u planning address this in any future releases?



Thanks

Tina Verma
Pavel_1
Contributor

I've looked through the links also.



In the first one the problem is solved by FindTabProcess function, which returns the needed IE process by its main process and page.

In the second one it is proposed to use different name mapping configutrations (one for IE7 and lower, second for IE8 and third for FF).

But I don't quite understand how's it possible to get apropriate browser process in case of IE8.



I just used the fact that IE creates a new child process with higher index everytime opening a new tab (page)

I use projectsuite.variables to store the info about which browser is used for test ("IE" or "FF").



function GetBrowser()

{

 var p,ind=1;

 if (ProjectSuite.Variables("browser")=="IE")

        while (Sys.WaitProcess("iexplore", 2000, ind).Exists)

         {

         p=Sys.Process("iexplore", ind);

         ind++;

         }

 else if (ProjectSuite.Variables("browser")=="FF")

 p = Sys.Process("firefox");



return p;

}




So you may use just GetBrowser() instead of the process object you take from mapping scheme after you've opened a new page,

like GetBrowser().WaitPage(...).



But I guess the approach like FindTabProcess in the first link can be better, you may try it also.

 
cancel
Showing results for 
Search instead for 
Did you mean: