Forum Discussion
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.
I think the biggest issue here to begin with is that the login button element that you were trying to interact with doesn't support the Keys method in the first place. Which is why I am somewhat skeptical that it worked within your local browser (seeing as the syntax didn't include the quotation marks, so that should have failed regardless of whether or not the browser was local to your machine).
In my case, when I used the object spy on a similar button object, i was able to find both of the methods of click and keys, so I could use either one, on both local and remote browsers.
If you are building out your script step by step, this would make it extra clear which methods you can/can't use 🙂
- krishnabr5 years agoOccasional Contributor
hkim5 , AlexKaras as I said in my initial post, I tried the options what you suggested. the problem is 'TestComplete' shows that the steps was executed successfully but there is no action on remote browser. even I can see the button highlighted on the screen captured, but action was not performed. the same script was successfully executed on my local browser.
Sys.Browser().Page("*").FindElement("#loginButton").ClickButton();
Also, tried using the object spy and tried all suitable methods like Click, ClickButton, ClickR, ClickM etc...
for some reason the click event is not converted to action on remote browser.
- hkim55 years agoStaff
"the problem is 'TestComplete' shows that the steps was executed successfully but there is no action on remote browser. even I can see the button highlighted on the screen captured, but action was not performed. the same script was successfully executed on my local browser."
this is a new problem that i didn't see you reference within your initial post. Let me check internally to see if there are any other reported issues with similar problems. I can understand how this is problematic/really annoying
- AlexKaras5 years agoChampion Level 3
> [Device Cloud] - Unable to send 'Keys' to CBT remote browser
Could you also clarify:
-- Do you execute tests using CBT integrated with TestComplete (i.e. via CBT object); or
-- Do you execute tests using new cross-platform mode of TestComplete and consuming CBT as a regular device cloud platform ?
I think the above information will be useful for hkim5 .
Related Content
- 3 years ago
Recent Discussions
- 2 days ago