Google chrome 29.0 is not working with webdriver

自古美人都是妖i 提交于 2019-12-10 21:52:59

问题


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.


回答1:


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.




回答2:


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....




回答3:


Download the latest version of chromedriver. Also make sure that the old old on NOT in your PATH.




回答4:


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.




回答5:


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.




回答6:


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.




回答7:


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.



来源:https://stackoverflow.com/questions/18459244/google-chrome-29-0-is-not-working-with-webdriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!