support send keys to active_element#707
support send keys to active_element#707Chris8711 wants to merge 3 commits intoappium:masterappium/python-client:masterfrom
Conversation
| """ | ||
| try: | ||
| return self.execute(W3C_Command.W3C_GET_ACTIVE_ELEMENT)['value'] | ||
| except NoSuchElementException: |
There was a problem hiding this comment.
it is ok to throw the exception from this method: https://www.w3.org/TR/webdriver/#dfn-get-active-element
| except NoSuchElementException: | ||
| return None | ||
|
|
||
| def send_keys_to_active_element(self, value: str): |
There was a problem hiding this comment.
I don't see any actual point in this helper method. also, it is not a part of the spec
There was a problem hiding this comment.
the driver.tap([positions]) will actually click some element
There was a problem hiding this comment.
I use other tool the get the position on the screenshot.
and use appium client to tap or click the screen.
if some element was tapped. Then I can use get_active_element to do other things
|
I can observe that selenium python lib already has a wrapper for active element: Wouldn't this be a duplicate then? |
yes. I haven't noticed that. |
|
this is duplicated |
|
Btw, sending keys to an active element is now W3C's send_keys action. Get an active element -> calling send_keys to the element is also the same, but the w3c action's one is old send_keys_active_element ( |
add a mixin class ActiveElement
support function get_active_element and send_keys_to_active_element