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

fix: send key multi byte string #474

Merged
merged 2 commits into from
Aug 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add a test for multi byte string
  • Loading branch information
KazuCocoa committed Aug 6, 2019
commit 67acaa5c02bf7c90cdc4c2ac9228cae771f8ebd9
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ class SendKeys : RequestHandler<TextParams, Void?> {
} catch (e: PerformException) {
throw InvalidElementStateException("sendKeys", params.elementId, e)
} catch (e: RuntimeException) {

e.message?.let {
if (!it.contains("IME does not understand how to translate")) throw e
}
Expand Down
7 changes: 7 additions & 0 deletions test/functional/commands/keyboard-e2e-specs.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ describe('keyboard', function () {
await el.clear();
});

it('should send keys to the correct element as replace text', async function () {
let el = await driver.elementByXPath('//android.widget.AutoCompleteTextView');
await el.click();
await el.sendKeys('ハロー');
await el.clear();
});

it('should send keys to the correct element', async function () {
let el = await driver.elementByXPath('//android.widget.AutoCompleteTextView');
await el.setImmediateValue('hello world');
Expand Down