Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

AndroidDriver#executeScript(...) doesn't work for scripts containing line breaks. #4816

Closed
lukeis opened this issue Mar 4, 2016 · 4 comments

Comments

@lukeis
Copy link
Member

lukeis commented Mar 4, 2016

Originally reported on Google Code with ID 4816

What steps will reproduce the problem?
1. call AndroidDriver#executeScript("return \n true");

What is the expected output? What do you see instead?

true is expected, but null is returned

Selenium version: 2.25
OS: Linux
Browser: Android
Browser version: 4.1

Reported by jan.papousek on 2012-11-23 14:09:42

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by adamgoucher on 2012-11-26 15:54:34

  • Labels added: Browser-Android

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

The code in the original bug report is not correct; JavaScript automatic semicolon insertion
turns that line of code into "return; true" so it can be expected that it would not
return true. This is per the spec and will occur everywhere. However, I can verify
that any code passed to executeScript containing newlines does not work correctly in
AndroidDriver and returns null when it should not. Modifying the original test case
code to be either "\nreturn true" or "return true\n" triggers the bug. "return true"
works.

Reported by google@zetafleet.com on 2013-10-24 16:01:40

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Selenium project no longer supports the AndroidDriver.

Please use Selendroid instead:
http://selendroid.io/webview.html

And log any issues against that project:
https://github.com/selendroid/selendroid/issues

Reported by luke.semerau on 2013-12-26 21:57:35

  • Status changed: WontFix

@lukeis
Copy link
Member Author

lukeis commented Mar 4, 2016

Reported by luke.semerau on 2015-09-17 18:16:25

  • Labels added: Restrict-AddIssueComment-Commit

@lukeis lukeis closed this as completed Mar 4, 2016
@SeleniumHQ SeleniumHQ locked and limited conversation to collaborators Mar 4, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant