Forum Discussion

clwild's avatar
clwild
Occasional Contributor
10 years ago

Google Chrome v36

Is Google Chrome v36 supported in Test Complete 10.3?



My simple Jscript can't click the 'Login' button and fails with the overlapped window.

ie. form.submitbuttonLogin.ClickButton();

 

I've also enabled the 'Ignore Overlapped Window' in my project and added SetFocus on the Login button.  But it still fails.  Any help?


 



  browser = Aliases.browser;


  page = browser.pageSupportSmartbearComSamplesTe;


  form = page.formAspnetform;


  form.textboxMaincontentUsername.SetText("tester");


  passwordBox = form.passwordboxMaincontentPassword;


  passwordBox.SetText("test");


  form.submitbuttonLogin.ClickButton();


  page.Wait();


  page.formAspnetform.linkLogout.Click();


  page.Wait();


  browser.BrowserWindow.Close();


 


}

20 Replies

  • Dear Tanya, just to avoid pointless conversation. I have already tried all suggestions from this page http://support.smartbear.com/viewarticle/62859/ 

    Reinstall both TC as well as chrome, checked that the extension is enabled, verified that emulation is disabled in Chrome etc. etc. Please do you have another reasonable advice? Thank you
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Unfortunately, it was unclear from your question what troubleshooting steps you had already performed.

     


    Can you tell us what TestComplete version is installed on your computer?


     


    then TC is actually clicking on the wrong position on the page istead of on the login icon.


     


    Could you please post more information about this? What is the expected and actual behavior? Several screenshots of the issue can shed some lights on what is going on.


     

  • I will try to give you additional information. I am trying to hit the LoginButton, sa you can see on the attached picture, but the TC si clickeng on the location found by ObjectSpy(on the left from the actual location). I am using the NativeWebObject method to find the object, so it should be unique and it works like a charm in IE. There has to be something wrong with Chrome or with TestComplete extension. Any ideas please?




    function test2()


    {


    //Browsers.Item("chrome").RunOptions = "disable-web-security";


    //Browsers.Item("chrome").RunOptions = "allow-file-access-from-files";


    //Browsers.Item("chrome").RunOptions = "disable-hang-monitor";


    //Browsers.Item("chrome").RunOptions = "allow-insecure-websocket-from-https-origin";


     



    //Browsers.Item(btIExplorer).Run(url);


    //Browsers.Item(btChrome).Run(url);


     


     


    page = Sys.Browser("chrome").Page(url);


    //page = Sys.Browser("iexplore").Page(url);


    Log.Picture(page,"page");


     


    var LoginButton = page.NativeWebObject.Find("id","LoginButton","div");


     


      if (LoginButton.Exists)


      {


      Log.Picture(LoginButton,"LoginIcon");


      LoginButton.Click();


      


      }


      else


      {


      Log.Error("not found")


      }


    }

  • TC                   10.30.1303.7

    Chrome          36.0.1985.143 m
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)
    Hi Martin,

     


    Thanks for the additional information.


     


    I've found that you are working with the Support team to resolve the issue. As the situation you faced isn't typical, and it is specific to your page, I suggest that you continue investigating it with them.


    Please update us when the issue is resolved.


     

  • clwild's avatar
    clwild
    Occasional Contributor
    Finally, someone is also encounting the same Chrome v36 issue I raised 18days ago.



    Hi Martin, I haven't resolved the problem.  I am disappointed that I haven't received any reasonable advice from SmartBear support staff to resolove this simple problem when I have already  provided detailed information.    Can you try my test if you can reproduce the same error on your chrome.  I appreciate your help.



    My script is really simple to launch 'TestComplete example website' and enter username and passward, and then click Login button.

    It works on IE 11.0 (64bit) perfectly but fails when clicking the Login button on Google Chrome 36 (all users) .

    See my attached chrome error document for the detailed error logs.  



    I run this JScript test on windows 8.1.



    1)  test passes on IE.


    function IETest()


    {


      var browser;


      var form;


      var panel;


      var textbox;


      TestedApps.WebOrders_Login_IE.Run();



      browser = Aliases.browser;


      form = browser.pageSupportSmartbearComSamplesTe.formAspnetform;


      textbox = form.textboxMaincontentUsername;


      textbox.SetText("Tester");


      form.passwordboxMaincontentPassword.SetText("test");


      form.submitbuttonLogin.ClickButton();


    }




    2) test fails on Chrome.


    function ChromeTest()


    {


      var browser;


      var page;


      var form;


      var passwordBox;


      TestedApps.WebOrders_Login_Chrome.Run();



      browser = Aliases.browser;


      page = browser.pageSupportSmartbearComSamplesTe;


      form = page.formAspnetform;


      form.textboxMaincontentUsername.SetText("Tester");


      passwordBox = form.passwordboxMaincontentPassword;


      passwordBox.SetText("test");


      form.submitbuttonLogin.ClickButton();  <<--- failed at this line.


    }



    Another problem is that I even can't find the 'Login' button control using Object Spy on Chrome.   However, I can do it on IE.   



    Just to clarify that I have already enabled the Chrome extension.  The test stopped at the following line:

      ...>   form.submitbuttonLogin.ClickButton();

    "There was an attempt to perform an action at point (41,31) which is invisible or out of the window bounds"



    Any help?





  • Hi there,

    I can confirm I have been facing the same behaviour as you. Do not ask me why, I assume that objects within Chrome have to be treated differently but I might have good news for you, try to execute the following test. I have been able to hit the Submit button in Chrome.



    Cheers




    function Test2()


    {



      Browsers.Item(btChrome).Run(url);


      var page = Sys.Browser().Page(url);


     


      page.FindChildByXPath("//input[@type='text']").SetText("Tester");


      page.FindChildByXPath("//input[@type='password']").SetText("test");


     


      // Press the "Login" button using the native click() method


      page.FindChildByXPath("//input[@type='submit']").NativeChromeObject.click();


    }

  • Unfortunatelly this solution does not work for me, I keep receiving that ChromeNativeObject is not supported property so I tried something similar and the result is the same as before, instead of clicking on the LoginButton, the TC is hitting location on the left from the actual LoginButton location :/

    I thought it might have been caused by the fact that my page is https so I tried to run the Chrome with disabled security option but with the same result.




    function Test10()


    {


      //Browsers.Item("chrome").RunOptions = "disable-web-security";



      Browsers.Item(btChrome).Run(url);


     


      // Press the "Login" button using the native click() method


      var object=Sys.Browser("chrome").Page(url).FindChildByXPath("//div[@id='LoginIcon']");


      object.Click();


    }

     



    Please see the attached screenshot.  If you have a clue, please send me a message. I do not really rely on SmartBear support since It is been a while they send me an email and all was like "check your zoom etc." 



  • clwild's avatar
    clwild
    Occasional Contributor
    Hi, Martin,



    Thanks for your solution.  It works for me by adding 'NativeChromeObject' in the script. 

    ie form.submitbuttonLogin.NativeChromeObject.click();


     


    I didn't use any FindChildByXPath method to locate the page element, as I expect that the recorded script could run successfully with slighty changes (not use different methods).


     


    However, I have found another way to fix my issue without using the NativeChromeObject.   I simply use the keyboard input 'Keys([Enter])' to press Enter on the Login button.

    ie. form.submitbuttonLogin.Keys("[Enter]");



    Maybe you can try to use keyboard input method  if it works.   It would be great if someone can suggest another solution to actually click the Login  button on the page instead of pressing the Enter key.



    If it still does not work, I hope SmartBear support staff can help.







     

  • Thanks for your suggestion, but the 'Enter' method is not sufficient solution of my situation because I do not have problems only with Login icon but with another objects within the Chrome as well and I cannot use Enter to handle them.



    Cheers

    Martin