Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Create an input source" doesn't add the source to the map #1810

Open
grokys opened this issue May 6, 2024 · 5 comments
Open

"Create an input source" doesn't add the source to the map #1810

grokys opened this issue May 6, 2024 · 5 comments

Comments

@grokys
Copy link

grokys commented May 6, 2024

Consider the following:

@grokys
Copy link
Author

grokys commented May 6, 2024

In fact I see that "add an input source" is only referenced in:

§ 12.5.1 Element Click
§ 12.5.3 Element Send Keys

So I'm not sure exactly what should be adding input sources for actions... The documentation for "input sources" says:

Each input source has an input id which is stored as a key in the input state map.

So I assume that implicitly means that create an input source should add the source to the map? But that conflicts with "Element Send Keys" which explicitly adds the input source to the map:

  1. Let source be the result of create an input source with input state, and "key".
  1. Add an input source with input state, input id and source.

@grokys
Copy link
Author

grokys commented May 6, 2024

Another question is: where should the input source created in process an input source sequence be removed? Again, "remove an input source" is only referenced in "Element Click" and "Element Send Keys".

EDIT: looks like input sources for actions shouldn't be removed until "Release Actions" is called.

@grokys
Copy link
Author

grokys commented May 6, 2024

Another problem:

Conflicts with:

i.e. it will fail for pointer actions?

@grokys
Copy link
Author

grokys commented May 6, 2024

Another problem:

process an input source action sequence can potentially be called multiple times from extract an action sequence, with differing types. If extract an action sequence should indeed add the source to the map, then this conflicts with:

As it would require an multiple input sources to be created with the same id but different types.

@ChernyshevDS
Copy link
Contributor

i.e. it will fail for pointer actions?

That part confuses me too. Why this specific handling for pointer actions?

Just a guess from my side (not really good when one have to guess while reading the spec...): get_or_create_input_source is mentioned only in processing actions section, and should add input sources to input map for them to survive between process_actions calls and they can be removed with release_actions. Meanwhile, in element_click and element_send_keys new input sources are created, temporarily added to input map, processed and removed at the end of processing sequence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants