Forum Discussion

krishnabr's avatar
krishnabr
Occasional Contributor
5 years ago

[Device Cloud] - Unable to send 'Keys' to CBT remote browser.

Hello,

i am trying to send 'Keys' to browser, it works perfectly fine in local browser, but when i try execute it in CBT remote browser it fails and following is the error message details found.

 

Unable to evaluate the operation's "Keys" parameter. Error: ReferenceError: Enter is not defined
 
Following is my line of code
Sys.Browser().Page("*").FindElement("#LoginButton").Keys([Enter]);
 
tried with all options like 'Click', ClickButton', ClickR, ClickL etc...
any help is appreciated. 
 
  • .Keys("[Enter]")

    try it with the quotation marks.

    • krishnabr's avatar
      krishnabr
      Occasional Contributor

      Thanks hkim5 , tried the way you suggested and getting below error

       

      The specified operation is not supported by the remote instance.

      Possible solutions:

      • Avoid using the operation on such instances.
      • Use an instance with different capabilities that supports the operation.

      Learn more about known issues and solutions Sys.Browser().Page("*").FindElement("#LoginButton")

      • AlexKaras's avatar
        AlexKaras
        Champion Level 3

        Hi,

         

        I am with Justin and my current understanding (based on the knowledge got from the documentation only, so I would appreciate your opinion based on the experience) is like this:

        -- .FindElement() method call in  cross-platform mode is translated into Selenium call that is executed on the target system;

        -- Documentation says nothing about object type returned as a result of successful method's call, but considering that TestComplete has no access to the tested system and thus the tested application is absent in the Object Browser, I think that native DOM object is returned as a result;

        -- .Keys() method is provided by TestComplete and is absent for native DOM objects;

        -- For Selenium they suggest to use something like this to send key presses:

        driver.findElement(By.id("content")).sendKeys(Keys.SPACE);

        So check methods supported by the button DOM object and try to use them.