Forum Discussion

sunil_Rathore's avatar
sunil_Rathore
Occasional Contributor
9 years ago

Find.region is not working in different browser

hello support team,

 

i'm using test complete11.31. i created some region checkpoint On Chrome. and playback of image click operation in Chrome then click operation works but if i use different browser like IE then click operation not happened and vice-versa.

var page = Sys.Browser("*").page("*");
var pagePicture = page.PagePicture();
var rect = Regions.FindRegion("Image1",pagePicture)
if (rect != null)
{
var x = page.ScreenLeft + rect.Left + rect.Width/2;
var y = page.ScreenTop + rect.Top + rect.Height/2;
var img = Sys.Desktop.ObjectFromPoint(x, y);
img.Click();
}

Window version - window7(64bit);

IE version - IE11.31

Chrome Version - Chrome49

so please help to overcome this problem.

  • Hi,

     

    An image-based approach is not very reliable, so we don't recommend to use it. TestComplete allows to record the tests with the web objects. TestCompelte supports all popular browsers (Firefox, Chrome, IE). So you can just record the test in Chrome and then play it back in Firefox. Please take a look at the Cross-Browser Testing - Overview article.

    • sunil_Rathore's avatar
      sunil_Rathore
      Occasional Contributor

      Hi,

      i agin create region using chrome49 and update region in script and run  in IE11then  it's not clicking. and if i record region in chrome 39 and run in chrome49 then it's not clicking.so what should i do for clicking on  a image??