Open pmontrasio opened 4 years ago
The documentation starting at https://github.com/HashNuke/hound/blob/e10c8723bcdcf3c64b0f21892bd61b98eb6ff0c9/lib/hound/helpers/page.ex#L229 doesn't list all the keys supported by set_keys/1
set_keys/1
I was looking for a way to send the right and left arrow keys to the browser, I kept reading the code and eventually found that set_keys/1 accepts any of the key codes defined at here and the following lines https://github.com/HashNuke/hound/blob/7cfa0f86ea55b61167c74088bb0c779adf3a7792/lib/hound/internal_helpers.ex#L27 Luckily the arrow keys are among them.
Maybe the documentation of set_keys/1 should link to the source code with the definitions of key_codes/1 Any developer is able to read that and there would be no need to keep the documentation of set_keys/1 in sync with the code.
key_codes/1
The documentation starting at https://github.com/HashNuke/hound/blob/e10c8723bcdcf3c64b0f21892bd61b98eb6ff0c9/lib/hound/helpers/page.ex#L229 doesn't list all the keys supported by
set_keys/1
I was looking for a way to send the right and left arrow keys to the browser, I kept reading the code and eventually found that
set_keys/1
accepts any of the key codes defined at here and the following lines https://github.com/HashNuke/hound/blob/7cfa0f86ea55b61167c74088bb0c779adf3a7792/lib/hound/internal_helpers.ex#L27 Luckily the arrow keys are among them.Maybe the documentation of
set_keys/1
should link to the source code with the definitions ofkey_codes/1
Any developer is able to read that and there would be no need to keep the documentation ofset_keys/1
in sync with the code.