Forum Discussion
.Keys("[Enter]")
try it with the quotation marks.
- krishnabr5 years agoOccasional 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")
- AlexKaras5 years agoChampion 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.
- hkim55 years agoStaff
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 🙂
- hkim55 years agoStaff
im guessing thats because its a button and it doesnt support the keys method. I think the error message is pretty straight forward there. you can use the object spy to target that login button and take a look at all of the methods that they do support. in which case you can most likely just click the button.
Related Content
- 4 years ago
Recent Discussions
- 2 days ago
- 2 days ago
- 5 days ago