AppleScript名:SeleniumでWebサーバー接続テストのじっけん |
— Created 2018-02-26 by Takaaki Naganoya — 2018 Piyomaru Software use AppleScript version "2.4" use scripting additions use framework "Foundation" use framework "Selenium" –https://github.com/appium/selenium-objective-c set aCap to current application’s SECapabilities’s new() aCap’s setPlatform:"Mac" aCap’s setBrowserName:"Safari" aCap’s setVersion:"11.0.3" –set anIP to ((current application’s NSHost’s hostWithName:"www.apple.com")’s address()) as string set {errorF, aRes} to current application’s SERemoteWebDriver’s alloc()’s initWithServerAddress:"0.0.0.0" |port|:8080 desiredCapabilities:aCap requiredCapabilities:(missing value) |error|:(reference) if errorF = missing value then return aRes’s |description|() as list of string or string –> "Error Domain=NSURLErrorDomain Code=-1004 \"サーバに接続できませんでした。\" UserInfo={NSUnderlyingError=0x6000022459d0 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 \"サーバに接続できませんでした。\" UserInfo={NSErrorFailingURLStringKey=http://0.0.0.0:8080/wd/hub/status, NSErrorFailingURLKey=http://0.0.0.0:8080/wd/hub/status, _kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1, NSLocalizedDescription=サーバに接続できませんでした。}}, NSErrorFailingURLStringKey=http://0.0.0.0:8080/wd/hub/status, NSErrorFailingURLKey=http://0.0.0.0:8080/wd/hub/status, _kCFStreamErrorDomainKey=1, _kCFStreamErrorCodeKey=61, NSLocalizedDescription=サーバに接続できませんでした。}" end if |
More from my site
(Visited 153 times, 2 visits today)