Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(52)

Issue 6630001: Allow webdriver users to choose between sending the key events when... (Closed)

Created:
9 years, 9 months ago by timothe faudot
Modified:
9 years, 3 months ago
CC:
chromium-reviews, Eran M. (Google)
Visibility:
Public.

Description

Allow webdriver users to choose between sending the key events when using send_keys to the window of the browser or to webkit directly as it was done before. BUG=74899 TEST=run chromedriver_tests.py using the new 2.0b3 version python drivers. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=80000

Patch Set 1 #

Total comments: 12

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Total comments: 6

Patch Set 6 : '' #

Total comments: 4

Patch Set 7 : '' #

Total comments: 10

Patch Set 8 : '' #

Total comments: 22

Patch Set 9 : '' #

Total comments: 16

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Total comments: 27

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Total comments: 24

Patch Set 16 : '' #

Total comments: 4

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Total comments: 4

Patch Set 20 : '' #

Patch Set 21 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -77 lines) Patch
M chrome/browser/automation/testing_automation_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +25 lines, -6 lines 0 comments Download
M chrome/browser/automation/testing_automation_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +117 lines, -52 lines 0 comments Download
M chrome/test/automation/automation_json_requests.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/test/automation/automation_json_requests.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +16 lines, -0 lines 0 comments Download
M chrome/test/webdriver/automation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +11 lines, -2 lines 0 comments Download
M chrome/test/webdriver/automation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +13 lines, -1 line 0 comments Download
M chrome/test/webdriver/chromedriver_tests.py View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 5 chunks +55 lines, -8 lines 0 comments Download
M chrome/test/webdriver/commands/create_session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +7 lines, -1 line 0 comments Download
M chrome/test/webdriver/commands/session_with_id.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/webdriver/session.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2 chunks +8 lines, -0 lines 0 comments Download
M chrome/test/webdriver/session.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 3 chunks +25 lines, -7 lines 0 comments Download
M chrome/test/webdriver/test_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 48 (0 generated)
timothe faudot
Hello everyone, here's the patch that allows users to switch between native and webkit events ...
9 years, 9 months ago (2011-03-04 04:19:34 UTC) #1
Hironori Bono
Greetings Tim, Thank you for your change. I have added some style nits. Regards, Hironori ...
9 years, 9 months ago (2011-03-04 06:25:16 UTC) #2
timothe faudot
http://codereview.chromium.org/6630001/diff/1/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/1/chrome/browser/automation/testing_automation_provider.cc#newcode4664 chrome/browser/automation/testing_automation_provider.cc:4664: && use_native_events) { On 2011/03/04 06:25:17, hbono wrote: > ...
9 years, 9 months ago (2011-03-04 06:47:35 UTC) #3
Jason Leyba
I would prefer native events be enabled on a per-session basis. This way users could ...
9 years, 9 months ago (2011-03-04 19:25:12 UTC) #4
Paweł Hajdan Jr.
Drive-by with automation-related comments. http://codereview.chromium.org/6630001/diff/2002/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/2002/chrome/browser/automation/testing_automation_provider.cc#newcode4659 chrome/browser/automation/testing_automation_provider.cc:4659: // If useNativeEvents is true, ...
9 years, 9 months ago (2011-03-05 11:55:51 UTC) #5
timothe faudot
On 2011/03/05 11:55:51, Paweł Hajdan Jr. wrote: > Drive-by with automation-related comments. > > http://codereview.chromium.org/6630001/diff/2002/chrome/browser/automation/testing_automation_provider.cc ...
9 years, 9 months ago (2011-03-07 02:15:42 UTC) #6
timothe faudot
On 2011/03/04 19:25:12, Jason Leyba wrote: > I would prefer native events be enabled on ...
9 years, 9 months ago (2011-03-07 02:22:58 UTC) #7
timothe faudot
On 2011/03/04 19:25:12, Jason Leyba wrote: > I would prefer native events be enabled on ...
9 years, 9 months ago (2011-03-07 02:45:07 UTC) #8
timothe faudot
http://codereview.chromium.org/6630001/diff/2002/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/2002/chrome/browser/automation/testing_automation_provider.cc#newcode4659 chrome/browser/automation/testing_automation_provider.cc:4659: // If useNativeEvents is true, this funciton will call ...
9 years, 9 months ago (2011-03-07 02:45:26 UTC) #9
Jason Leyba
On 2011/03/07 02:45:07, timothe faudot wrote: > On 2011/03/04 19:25:12, Jason Leyba wrote: > > ...
9 years, 9 months ago (2011-03-07 03:27:22 UTC) #10
Jason Leyba
If you're not going to support concurrent sessions when native events are enabled, you need ...
9 years, 9 months ago (2011-03-07 03:32:56 UTC) #11
timothe faudot
On 2011/03/07 03:32:56, Jason Leyba wrote: > If you're not going to support concurrent sessions ...
9 years, 9 months ago (2011-03-07 04:16:23 UTC) #12
timothe faudot
On 2011/03/07 03:32:56, Jason Leyba wrote: > If you're not going to support concurrent sessions ...
9 years, 9 months ago (2011-03-07 04:22:41 UTC) #13
timothe faudot
Native events are now enabled on a per session basis using a rediredCapability with the ...
9 years, 9 months ago (2011-03-07 10:38:27 UTC) #14
Paweł Hajdan Jr.
BTW, the BUG=chromium-1234 syntax in the commit message is not recognizedby Rietveld. BUG=1234 is. Are ...
9 years, 9 months ago (2011-03-07 20:07:37 UTC) #15
timothe faudot
I also changed the bug ID format to be parsed, thank you for pointing this ...
9 years, 9 months ago (2011-03-08 04:56:14 UTC) #16
Paweł Hajdan Jr.
http://codereview.chromium.org/6630001/diff/8004/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/8004/chrome/browser/automation/testing_automation_provider.cc#newcode4664 chrome/browser/automation/testing_automation_provider.cc:4664: use_native_events) { Yeah, if you'd like to keep it, ...
9 years, 9 months ago (2011-03-08 07:53:05 UTC) #17
timothe faudot
http://codereview.chromium.org/6630001/diff/8004/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/8004/chrome/browser/automation/testing_automation_provider.cc#newcode4664 chrome/browser/automation/testing_automation_provider.cc:4664: use_native_events) { On 2011/03/08 07:53:05, Paweł Hajdan Jr. wrote: ...
9 years, 9 months ago (2011-03-08 09:08:17 UTC) #18
Paweł Hajdan Jr.
Code I commented in the drive-by LGTM with the following comments. Thank you. http://codereview.chromium.org/6630001/diff/3030/chrome/browser/automation/testing_automation_provider.cc File ...
9 years, 9 months ago (2011-03-08 09:25:13 UTC) #19
timothe faudot
http://codereview.chromium.org/6630001/diff/3030/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/3030/chrome/browser/automation/testing_automation_provider.cc#newcode4671 chrome/browser/automation/testing_automation_provider.cc:4671: } On 2011/03/08 09:25:13, Paweł Hajdan Jr. wrote: > ...
9 years, 9 months ago (2011-03-08 09:34:23 UTC) #20
kkania
thanks for doing this! http://codereview.chromium.org/6630001/diff/6046/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/6046/chrome/browser/automation/testing_automation_provider.cc#newcode4662 chrome/browser/automation/testing_automation_provider.cc:4662: void TestingAutomationProvider::SendKeyEventToActiveTab( This function has ...
9 years, 9 months ago (2011-03-10 00:28:58 UTC) #21
timothe faudot
hello there, I merged the conflicts that arose from the change in the automation and ...
9 years, 9 months ago (2011-03-10 05:34:32 UTC) #22
kkania
About the "DOM operation completed, but no reply message", don't worry about it. It is ...
9 years, 9 months ago (2011-03-10 17:00:47 UTC) #23
kkania
oh, and about the tests, put them in chromedriver_tests.py
9 years, 9 months ago (2011-03-10 17:13:26 UTC) #24
timothe faudot
Okay, here is a cleaned up version, not using the webkeyevent as suggested, this simplifies ...
9 years, 9 months ago (2011-03-11 03:32:08 UTC) #25
kkania
http://codereview.chromium.org/6630001/diff/23005/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/23005/chrome/browser/automation/testing_automation_provider.cc#newcode4689 chrome/browser/automation/testing_automation_provider.cc:4689: if (!BuildWebKeyEventFromArgs(args, reply_message, &event)) I am not sure what ...
9 years, 9 months ago (2011-03-11 16:32:13 UTC) #26
timothe
Sorry for the wait, Tokyo was quite Chaotic last week, I focused on other things... ...
9 years, 9 months ago (2011-03-21 18:02:05 UTC) #27
timothe
The patch set 15 now waits for the event to be finished using SendKeyPressNotifyWhenDone and ...
9 years, 9 months ago (2011-03-22 16:36:16 UTC) #28
Paweł Hajdan Jr.
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4633 chrome/browser/automation/testing_automation_provider.cc:4633: LOG(INFO) << "reply_message:" << reply_message; Please remove debugging LOG ...
9 years, 9 months ago (2011-03-23 10:16:05 UTC) #29
timothe
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4633 chrome/browser/automation/testing_automation_provider.cc:4633: LOG(INFO) << "reply_message:" << reply_message; On 2011/03/23 10:16:05, Paweł ...
9 years, 9 months ago (2011-03-23 10:54:03 UTC) #30
kkania
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4531 chrome/browser/automation/testing_automation_provider.cc:4531: remove unecessary newline http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4536 chrome/browser/automation/testing_automation_provider.cc:4536: if (!args->GetInteger("type", &type)) { ...
9 years, 9 months ago (2011-03-24 23:20:32 UTC) #31
timothe
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4531 chrome/browser/automation/testing_automation_provider.cc:4531: On 2011/03/24 23:20:32, kkania wrote: > remove unecessary newline ...
9 years, 9 months ago (2011-03-25 11:07:59 UTC) #32
kkania
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4665 chrome/browser/automation/testing_automation_provider.cc:4665: // containing the element we send the text in ...
9 years, 9 months ago (2011-03-25 16:37:36 UTC) #33
timothe
http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/28015/chrome/browser/automation/testing_automation_provider.cc#newcode4665 chrome/browser/automation/testing_automation_provider.cc:4665: // containing the element we send the text in ...
9 years, 8 months ago (2011-03-28 18:35:48 UTC) #34
kkania
LGTM after nits http://codereview.chromium.org/6630001/diff/49001/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/49001/chrome/browser/automation/testing_automation_provider.cc#newcode4632 chrome/browser/automation/testing_automation_provider.cc:4632: void TestingAutomationProvider::SendSuccessReply(IPC::Message* reply_message) { convention is ...
9 years, 8 months ago (2011-03-29 04:55:12 UTC) #35
timothe
http://codereview.chromium.org/6630001/diff/49001/chrome/browser/automation/testing_automation_provider.cc File chrome/browser/automation/testing_automation_provider.cc (right): http://codereview.chromium.org/6630001/diff/49001/chrome/browser/automation/testing_automation_provider.cc#newcode4632 chrome/browser/automation/testing_automation_provider.cc:4632: void TestingAutomationProvider::SendSuccessReply(IPC::Message* reply_message) { On 2011/03/29 04:55:12, kkania wrote: ...
9 years, 8 months ago (2011-03-29 14:15:37 UTC) #36
timothe
Some merging conflicts appeared after the recent "screenshot on error" update, so I fixed those.
9 years, 8 months ago (2011-03-31 14:26:45 UTC) #37
timothe
Ho and by the way I don't have commit rights yet, so even with lgtm ...
9 years, 8 months ago (2011-03-31 14:33:49 UTC) #38
Hironori Bono
Greetings Tim, I have sent this change to the commit-queue and it is trying your ...
9 years, 8 months ago (2011-03-31 14:48:45 UTC) #39
commit-bot: I haz the power
Change committed as 80000
9 years, 8 months ago (2011-03-31 15:32:45 UTC) #40
timothe
Thank you very much Bono-san for committing the change. Best, Timothe On Thu, Mar 31, ...
9 years, 8 months ago (2011-03-31 15:35:28 UTC) #41
kkania
Hey Timothe, looks like your new test is failing. Look under the chromedriver_tests step on ...
9 years, 8 months ago (2011-03-31 17:03:39 UTC) #42
timothe
Is it possible that the test page html was cached by the test bot? hence ...
9 years, 8 months ago (2011-03-31 17:10:30 UTC) #43
kkania
No, it wasn't cached. But the CL I sent you fixed the problem, so that ...
9 years, 8 months ago (2011-03-31 17:25:59 UTC) #44
kkania
It passes on Win Vista, but not on Win7 it appears: http://build.chromium.org/p/chromium.pyauto/builders/Win7/builds/6689/steps/chromedriver_tests/logs/stdio
9 years, 8 months ago (2011-03-31 18:06:51 UTC) #45
timothe
Seems so, the failure is internal to ui_controls_win.cc+165 : SendKeyPressImpl as it seems to return ...
9 years, 8 months ago (2011-03-31 18:19:20 UTC) #46
timothe
From what I can see looking at the code: the only way SendKeyPressImpl can return ...
9 years, 8 months ago (2011-03-31 21:27:35 UTC) #47
timothe
9 years, 8 months ago (2011-04-02 02:08:25 UTC) #48
I had access to a win7 machine today, I synched to trunk, build and ran the
chromedriver_tests and they all worked, including the one that's failing on the
buildbot.
I didn't ran them as a superuser or anything so that may be a buildbot
configuration issue in the end.

On 2011/03/31 21:27:35, timothe wrote:
> From what I can see looking at the code:
> the only way SendKeyPressImpl can return false, hence triggering an internal
> send key error is the function call at +233:
> 
> if (::SendInput(i, input, sizeof(INPUT)) != i)    return false; All
> the previous tests of this function call a method with a boolean
> signature but that never returns false...so the only "return false;"
> statement that triggers the internal sendkeys error is at this line
> 233.
> I would suggest adding logging of a GetLastError() call before the
> return false to see what's happening on windows 7.The reason of
> SendInput returning false as written in the microsoft documentation
> (http://msdn.microsoft.com/en-us/library/ms646310%28v=vs.85%29.aspx) is
> 
>    - This function fails when it is blocked by UIPI (User Interface
> Privilege Isolation)
> 
> or
> 
>    - The input was already blocked by another thread
> 
> Any chance win7 bots could have issues with those 2 previous causes?
> I'll try looking into this more deeply once I have access to a win7
> machine, which will not be the case until end of next week as I'm
> travelling only with a macbook laptop right now, I am sorry for the
> trouble.
> 
> 
> On Thu, Mar 31, 2011 at 2:19 PM, Timothe Faudot <mailto:timothe@google.com>
wrote:
> 
> > Seems so, the failure is internal to ui_controls_win.cc+165 :
> > SendKeyPressImpl as it seems to return false. I have no idea why and have no
> > access to a win7 machine right now. Any suggestion on how to handle this?
> >
> >
> > On Thu, Mar 31, 2011 at 2:06 PM, <mailto:kkania@chromium.org> wrote:
> >
> >> It passes on Win Vista, but not on Win7 it appears:
> >>
> >>
> >>
>
http://build.chromium.org/p/chromium.pyauto/builders/Win7/builds/6689/steps/c...
> >>
> >>
> >> http://codereview.chromium.org/6630001/
> >>
> >
> >

Powered by Google App Engine
This is Rietveld 408576698