puppeteer-ruby 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/docs/Puppeteer.html +2 -2
  3. data/docs/Puppeteer/AsyncAwaitBehavior.html +1 -1
  4. data/docs/Puppeteer/Browser.html +1 -1
  5. data/docs/Puppeteer/BrowserContext.html +1 -1
  6. data/docs/Puppeteer/BrowserFetcher.html +1 -1
  7. data/docs/Puppeteer/BrowserRunner.html +1 -1
  8. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +1 -1
  9. data/docs/Puppeteer/CDPSession.html +1 -1
  10. data/docs/Puppeteer/CDPSession/Error.html +1 -1
  11. data/docs/Puppeteer/ConcurrentRubyUtils.html +1 -1
  12. data/docs/Puppeteer/Connection.html +1 -1
  13. data/docs/Puppeteer/Connection/MessageCallback.html +1 -1
  14. data/docs/Puppeteer/Connection/ProtocolError.html +1 -1
  15. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +1 -1
  16. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +1 -1
  17. data/docs/Puppeteer/ConsoleMessage.html +1 -1
  18. data/docs/Puppeteer/ConsoleMessage/Location.html +1 -1
  19. data/docs/Puppeteer/DOMWorld.html +75 -1
  20. data/docs/Puppeteer/DOMWorld/DetachedError.html +1 -1
  21. data/docs/Puppeteer/DebugPrint.html +1 -1
  22. data/docs/Puppeteer/Device.html +1 -1
  23. data/docs/Puppeteer/Devices.html +1 -1
  24. data/docs/Puppeteer/ElementHandle.html +1 -1
  25. data/docs/Puppeteer/ElementHandle/BoundingBox.html +1 -1
  26. data/docs/Puppeteer/ElementHandle/BoxModel.html +1 -1
  27. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +1 -1
  28. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +1 -1
  29. data/docs/Puppeteer/ElementHandle/Point.html +1 -1
  30. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +1 -1
  31. data/docs/Puppeteer/EmulationManager.html +1 -1
  32. data/docs/Puppeteer/EventCallbackable.html +1 -1
  33. data/docs/Puppeteer/EventCallbackable/EventListeners.html +1 -1
  34. data/docs/Puppeteer/ExecutionContext.html +1 -1
  35. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +1 -1
  36. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +1 -1
  37. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +1 -1
  38. data/docs/Puppeteer/FileChooser.html +1 -1
  39. data/docs/Puppeteer/Frame.html +44 -22
  40. data/docs/Puppeteer/FrameManager.html +1 -1
  41. data/docs/Puppeteer/FrameManager/NavigationError.html +1 -1
  42. data/docs/Puppeteer/IfPresent.html +1 -1
  43. data/docs/Puppeteer/JSHandle.html +1 -1
  44. data/docs/Puppeteer/Keyboard.html +1 -1
  45. data/docs/Puppeteer/Keyboard/KeyDefinition.html +1 -1
  46. data/docs/Puppeteer/Keyboard/KeyDescription.html +1 -1
  47. data/docs/Puppeteer/Launcher.html +1 -1
  48. data/docs/Puppeteer/Launcher/Base.html +1 -1
  49. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +1 -1
  50. data/docs/Puppeteer/Launcher/BrowserOptions.html +1 -1
  51. data/docs/Puppeteer/Launcher/Chrome.html +36 -31
  52. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +1 -1
  53. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +1 -1
  54. data/docs/Puppeteer/Launcher/LaunchOptions.html +1 -1
  55. data/docs/Puppeteer/LifecycleWatcher.html +1 -1
  56. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +1 -1
  57. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +1 -1
  58. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +1 -1
  59. data/docs/Puppeteer/Mouse.html +1 -1
  60. data/docs/Puppeteer/Mouse/Button.html +1 -1
  61. data/docs/Puppeteer/NetworkManager.html +1 -1
  62. data/docs/Puppeteer/NetworkManager/Credentials.html +1 -1
  63. data/docs/Puppeteer/Page.html +5 -5
  64. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +1 -1
  65. data/docs/Puppeteer/Page/ScreenshotOptions.html +1 -1
  66. data/docs/Puppeteer/Page/ScriptTag.html +1 -1
  67. data/docs/Puppeteer/Page/StyleTag.html +1 -1
  68. data/docs/Puppeteer/Page/TargetCrashedError.html +1 -1
  69. data/docs/Puppeteer/RemoteObject.html +1 -1
  70. data/docs/Puppeteer/Target.html +1 -1
  71. data/docs/Puppeteer/Target/InitializeFailure.html +1 -1
  72. data/docs/Puppeteer/Target/TargetInfo.html +1 -1
  73. data/docs/Puppeteer/TimeoutError.html +1 -1
  74. data/docs/Puppeteer/TimeoutSettings.html +1 -1
  75. data/docs/Puppeteer/TouchScreen.html +1 -1
  76. data/docs/Puppeteer/Viewport.html +1 -1
  77. data/docs/Puppeteer/WaitTask.html +1 -1
  78. data/docs/Puppeteer/WaitTask/TerminatedError.html +1 -1
  79. data/docs/Puppeteer/WaitTask/TimeoutError.html +1 -1
  80. data/docs/Puppeteer/WebSocket.html +1 -1
  81. data/docs/Puppeteer/WebSocket/DriverImpl.html +1 -1
  82. data/docs/Puppeteer/WebSocket/TransportError.html +1 -1
  83. data/docs/Puppeteer/WebSocketTransport.html +1 -1
  84. data/docs/_index.html +1 -1
  85. data/docs/file.README.html +1 -1
  86. data/docs/index.html +1 -1
  87. data/docs/method_list.html +278 -270
  88. data/docs/top-level-namespace.html +1 -1
  89. data/lib/puppeteer/dom_world.rb +4 -6
  90. data/lib/puppeteer/frame.rb +1 -0
  91. data/lib/puppeteer/launcher/chrome.rb +9 -7
  92. data/lib/puppeteer/page.rb +2 -2
  93. data/lib/puppeteer/version.rb +1 -1
  94. metadata +1 -1
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Tue Jun 23 10:24:58 2020 by
119
+ Generated on Wed Jun 24 03:07:58 2020 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.9.24 (ruby-2.6.3).
122
122
  </div>
@@ -411,12 +411,10 @@ class Puppeteer::DOMWorld
411
411
  # return new WaitTask(this, pageFunction, 'function', polling, timeout, ...args).promise;
412
412
  # }
413
413
 
414
- # /**
415
- # * @return {!Promise<string>}
416
- # */
417
- # async title() {
418
- # return this.evaluate(() => document.title);
419
- # }
414
+ # @return [String]
415
+ def title
416
+ evaluate('() => document.title')
417
+ end
420
418
 
421
419
  # @param selector_or_xpath [String]
422
420
  # @param is_xpath [Boolean]
@@ -258,6 +258,7 @@ class Puppeteer::Frame
258
258
  @main_world.wait_for_function(page_function, options, *args)
259
259
  end
260
260
 
261
+ # @return [String]
261
262
  def title
262
263
  @secondary_world.title
263
264
  end
@@ -139,6 +139,7 @@ module Puppeteer::Launcher
139
139
  end
140
140
  end
141
141
 
142
+ # @return [DefaultArgs]
142
143
  def default_args(options = nil)
143
144
  if options.nil?
144
145
  @default_args ||= DefaultArgs.new(@chrome_arg_options)
@@ -147,8 +148,7 @@ module Puppeteer::Launcher
147
148
  end
148
149
  end
149
150
 
150
- # @param {!(Launcher.BrowserOptions & {browserWSEndpoint?: string, browserURL?: string, transport?: !Puppeteer.ConnectionTransport})} options
151
- # @return {!Promise<!Browser>}
151
+ # @return [Puppeteer::Browser]
152
152
  def connect(options = {})
153
153
  @browser_options = BrowserOptions.new(options)
154
154
  browser_ws_endpoint = options[:browser_ws_endpoint]
@@ -187,11 +187,13 @@ module Puppeteer::Launcher
187
187
 
188
188
  # @return [Puppeteer::Connection]
189
189
  private def connect_with_browser_url(browser_url)
190
- raise NotImplementedError.new('Puppeteer#connect with browserUrl is not implemented yet.')
191
- # const connectionURL = await getWSEndpoint(browserURL);
192
- # const connectionTransport = await WebSocketTransport.create(
193
- # connectionURL
194
- # );
190
+ require 'net/http'
191
+ uri = URI(browser_url)
192
+ uri.path = '/json/version'
193
+ response_body = Net::HTTP.get(uri)
194
+ json = JSON.parse(response_body)
195
+ connection_url = json['webSocketDebuggerUrl']
196
+ connect_with_browser_ws_endpoint(connection_url)
195
197
  end
196
198
 
197
199
  # @return [Puppeteer::Connection]
@@ -845,9 +845,9 @@ class Puppeteer::Page
845
845
  @frame_manager.network_manager.cache_enabled = enabled
846
846
  end
847
847
 
848
- # @return {!Promise<string>}
848
+ # @return [String]
849
849
  def title
850
- @title
850
+ main_frame.title
851
851
  end
852
852
 
853
853
  # /**
@@ -1,3 +1,3 @@
1
1
  class Puppeteer
2
- VERSION = '0.0.12'
2
+ VERSION = '0.0.13'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppeteer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.12
4
+ version: 0.0.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki