Google chrome 29.0 is not working with webdriver

2019-07-08 05:07发布

I was trying to load google chrome browser with watir-webdriver, but while invoking any URL in the browser it is throwing following error

Selenium::WebDriver::Error::UnknownError: Unknown command 'WaitForAllTabsToStopL
oading'. Options: AcceptOrDismissAppModalDialog, ActionOnSSLBlockingPage, Activa
teTab, AddBookmark, AddDomEventObserver, AppendTab, ApplyAccelerator, BringBrows
erToFront, ClearEventQueue, CloseBrowserWindow, CloseTab, CreateNewAutomationPro
vider, DeleteCookie, DeleteCookieInBrowserContext, DoesAutomationObjectExist, Dr
agAndDropFilePaths, ExecuteJavascript, ExecuteJavascriptInRenderView, GetActiveT
abIndex, GetAppModalDialogMessage, GetBookmarkBarStatus, GetBookmarksAsJSON, Get
BrowserInfo, GetBrowserWindowCount, GetChromeDriverAutomationVersion, GetCookies
, GetCookiesInBrowserContext, GetDownloadDirectory, GetExtensionsInfo, GetIndice
sFromTab, GetLocalStatePrefsInfo, GetMultiProfileInfo, GetNextEvent, GetPrefsInf
o, GetProcessInfo, GetSecurityState, GetTabCount, GetTabIds, GetTabInfo, GetView
s, GoBack, GoForward, InstallExtension, IsDownloadShelfVisible, IsFindInPageVisi
ble, IsMenuCommandEnabled, IsPageActionVisible, IsTabIdValid, MaximizeView, Navi
gateToURL, OpenFindInPage, OpenNewBrowserWindow, OpenNewBrowserWindowWithNewProf
ile, OpenProfileWindow, OverrideGeoposition, RefreshPolicies, Reload, RemoveBook
mark, RemoveEventObserver, ReparentBookmark, RunCommand, SendWebkitKeyEvent, Set
BookmarkTitle, SetBookmarkURL, SetCookie, SetCookieInBrowserContext, SetDownload
ShelfVisible, SetExtensionStateById, SetLocalStatePrefs, SetPrefs, SetViewBounds
, SimulateAsanMemoryBug, TriggerBrowserActionById, TriggerPageActionById, Uninst
allExtensionById, UpdateExtensionsNow, WaitForBookmarkModelToLoad, WaitUntilNavi
gationCompletes, WebkitMouseButtonDown, WebkitMouseButtonUp, WebkitMouseClick, W
ebkitMouseDoubleClick, WebkitMouseDrag, WebkitMouseMove, AcceptCurrentFullscreen
OrMouseLockRequest, AddOrEditSearchEngine, AddSavedPassword, CloseNotification,
DenyCurrentFullscreenOrMouseLockRequest, DisablePlugin, EnablePlugin, FindInPage
, GetAllNotifications, GetDownloadsInfo, GetFPS, GetHistoryInfo, GetInitialLoadT
imes, GetNTPInfo, GetNavigationInfo, GetOmniboxInfo, GetPluginsInfo, GetSavedPas
swords, GetSearchEngineInfo, GetV8HeapStats, ImportSettings, IsFullscreenBubbleD
isplayed, IsFullscreenBubbleDisplayingButtons, IsFullscreenForBrowser, IsFullscr
eenForTab, IsFullscreenPermissionRequested, IsMouseLockPermissionRequested, IsMo
useLocked, KillRendererProcess, LaunchApp, LoadSearchEngineInfo, OmniboxAcceptIn
put, OmniboxMovePopupSelection, PerformActionOnDownload, PerformActionOnInfobar,
 PerformActionOnSearchEngine, RemoveNTPMostVisitedThumbnail, RemoveSavedPassword
, RestoreAllNTPMostVisitedThumbnails, SaveTabContents, SetAppLaunchType, SetOmni
boxText, SetWindowDimensions, WaitForAllDownloadsToComplete, WaitForNotification
Count,

It might be throwing this error because of Chrome update where as webdriver is not supporting the updated API's, I also tried to update watir-webdriver gem, but it is saying nothing to update (its up to date) My watir-webdriver version is watir-webdriver-0.6.4

Kindly let me know if any one else is facing the same issue or any one found out the solution for the same.

7条回答
老娘就宠你
2楼-- · 2019-07-08 05:21

I have seen this issue and we fixed it by moving to ChromeDriver 2.3 in both Mac and Windows Versions I use: Ruby version: 1.9.3-p194 Watir-webdriver version: 0.6.4 Selenium-webdriver version: 2.33.0

if you can make sure chrome driver is in the PATH, this should work. No need to upgrade to ruby 2.0.

查看更多
来,给爷笑一个
3楼-- · 2019-07-08 05:25

I am also facing the same issue. I am getting this error exactly when I am trying to navigate to driver.goto("google.com").

But if I revert my Chrome version from 29 to 27 then its working fine. So I think the issue is from chrome version 29 or chrome driver version chromedriver_win32_2.2.zip

So please downgrade the chrome temporarily....

查看更多
Evening l夕情丶
4楼-- · 2019-07-08 05:26

Gaurav, I've had the same issue.

Here are the steps how i fixed this:

1. Remove old the versions (ruby, watir, devkit)
2. Install to Ruby 2.0.0-p195
3. Install devkit
4. Add latest chromedriver to your $PATH
5. gem install watir-webdriver 
6. gem update --system
7. gem update
8. gem cleanup

Also update the chromedriver executable to the latest version (and double check it in your path). I have: ruby 2.0.0p195 (2013-05-14) [i386-mingw32] && watir-webdriver(0.6.4)

Voila:

C:\Ruby200\bin>irb
irb(main):001:0> require "watir-webdriver"
=> true
irb(main):002:0> b = Watir::Browser.new :chrome
Starting ChromeDriver (v2.2) on port 9515
=> #<Watir::Browser:0x3cac37de url="data:text/html;charset=utf-8," title="data:t
ext/html;charset=utf-8,">
irb(main):003:0> b.goto "stackoverflow.com"
=> "http://stackoverflow.com/"
irb(main):004:0> b.inspect
=> "#<Watir::Browser:0x50eee9c0 url=\"http://stackoverflow.com/\" title=\"Stack
Overflow\">"

Please let me know if it helped.

查看更多
Ridiculous、
5楼-- · 2019-07-08 05:37

Use the Latest jar file of selenium web driver- selenium-server-standalone-2.35.0.jar

and chromedriver_win32_2.3.zip for chrome driver.

查看更多
Evening l夕情丶
6楼-- · 2019-07-08 05:42

Did you upgrade to the latest version of selenium-webdriver?

gem install selenium-webdriver

Remember that watir-webdriver is just a wrapper around selenium-webdriver. It is actually selenium-webdriver that does the interaction with chromedriver. Typically, when there is an update to chromedriver, there also needs to be an update to selenium-webdriver.

There were 2 updates to selenium-webdriver since the latest chromedriver update. It is possible that one of the updates addressed your issue.

查看更多
在下西门庆
7楼-- · 2019-07-08 05:43

You would use capabilities to point to the right binary file of the browser to be launced.But not all versions of chrome browser is supported by different versions of chromedriver. You will find exceptions stating that version of browser expected is greater or equal to 30.0.

For ex:- Chromium Browser(33.0.1729.0 )works fine with ChromeDriver 2.7 and not the with the older ones.

You can choose from all the chromedriver version available from the link below:- http://chromedriver.storage.googleapis.com/index.html

So try to use the browser version supported by the chromedriver.

查看更多
登录 后发表回答