Google chrome 29.0不适用于webdriver [英] Google chrome 29.0 is not working with webdriver

查看:193
本文介绍了Google chrome 29.0不适用于webdriver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用watir-webdriver加载谷歌Chrome浏览器,但是在浏览器中调用任何URL时抛出以下错误:

  Selenium :: WebDriver :: Error :: UnknownError:未知命令'WaitForAllTabsToStopL 
oading'。选项: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 $ b $,GetProcessInfo,GetSecurityState,GetTabCount,GetTabIds,GetTabInfo,GetView
s,GoBack,GoForward,InstallExtension,IsDownloadShelfVisible,IsFindInPageVisi
ble,IsMenuCommandEnabled,IsPageActionVisible,IsTabIdValid,中号aximizeView,Navi
gateToURL,OpenFindInPage,OpenNewBrowserWindow,OpenNewBrowserWindowWithNewProf $ b ile,OpenProfileWindow,OverrideGeoposition,RefreshPolicies,Reload,RemoveBook $ b $ 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,GetDownlo adsInfo,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
将,OmniboxMovePopupSelection,PerformActionOnDownload,PerformActionOnInfobar,
PerformActionOnSearchEngine,RemoveNTPMostVisitedThumbnail,RemoveSavedPassword
,RestoreAllNTPMostVisitedThumbnails,SaveTabContents, SetAppLaunchType,SetOmni
boxText,SetWindowDimensions,WaitForAllDownloadsToComplete,WaitForNotification
Count,

它可能会抛出这个错误,因为Chrome更新在哪里作为webdriver不支持更新的API,
我也trie d更新watir-webdriver gem,但它没有说更新(它的最新版本)我的watir-webdriver版本是 watir-webdriver-0.6.4



请让我知道是否有其他人面临同样的问题,或任何人找到相同的解决方案。 >解决方案

Gaurav,我有同样的问题。



以下是我解决这个问题的步骤:

  1。删除旧版本(ruby,watir,devkit)
2.安装到Ruby 2.0.0-p195
3.安装devkit
4.将最新的chromedriver添加到您的$ PATH
5. gem install watir-webdriver
6. gem update --system
7. gem update
8. gem cleanup

同时将chromedriver可执行文件更新到最新版本(并在您的路径中仔细检查)。
我有:ruby 2.0.0p195(2013-05-14)[i386-mingw32]&& watir-webdriver(0.6.4)



Voila:

  C :\Ruby200\bin> irb 
irb(main):001:0>需要watir-webdriver
=> true
irb(main):002:0> b = Watir :: Browser.new:chrome
在端口9515上启动ChromeDriver(v2.2)
=> #< Watir :: Browser:0x3cac37de url =data:text / html; charset = utf-8,title =data:t
ext / html; charset = utf-8,>
irb(main):003:0> b.gotostackoverflow.com
=> http://stackoverflow.com/
irb(main):004:0> b.inspect
=> #< Watir :: Browser:0x50eee9c0 url = \http://stackoverflow.com/\title = \Stack
Overflow\>

请让我知道它是否有帮助。


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.

解决方案

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.

这篇关于Google chrome 29.0不适用于webdriver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆