{"action":"created","issue":{"url":"https://api.github.com/repos/appium/ruby_lib/issues/383","repository_url":"https://api.github.com/repos/appium/ruby_lib","labels_url":"https://api.github.com/repos/appium/ruby_lib/issues/383/labels{/name}","comments_url":"https://api.github.com/repos/appium/ruby_lib/issues/383/comments","events_url":"https://api.github.com/repos/appium/ruby_lib/issues/383/events","html_url":"https://github.com/appium/ruby_lib/pull/383","id":183202013,"number":383,"title":"update selenium-webdriver 3.0 and add patches to work with Appium","user":{"login":"KazuCocoa","id":5511591,"avatar_url":"https://avatars.githubusercontent.com/u/5511591?v=3","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-10-15T10:27:04Z","updated_at":"2016-11-12T05:26:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/appium/ruby_lib/pulls/383","html_url":"https://github.com/appium/ruby_lib/pull/383","diff_url":"https://github.com/appium/ruby_lib/pull/383.diff","patch_url":"https://github.com/appium/ruby_lib/pull/383.patch"},"body":"## motivation\r\n\r\nUsing `selenium-webdriver 3.0` instead of `selenium-webdriver 2.x` to catch up with the latest maintained library.\r\n\r\n## What I do\r\n\r\nFix some issues I encountered issues I ran my test suite with `selenium-webdriver 3.0`.\r\n\r\nWe should use legacy `Bridge` to compatible with Appium server. `W3CBridge`, used in Selenium3 Ruby client by default, differs paths between `selenium-webdriver 2.x` and `selenium-webdriver 3.x`. So, we encounter some no route error if we use `W3CBridge`. For instance, the following paths are changed paths between `selenium-webdriver 2.x` and `selenium-webdriver 3.x`.\r\n\r\n- selenium-webdriver 2.x with Bridge\r\n\r\n```\r\n        command :setWindowSize, :post, 'session/:session_id/window/:window_handle/size'\r\n        command :executeScript, :post, 'session/:session_id/execute'\r\n        command :executeAsyncScript, :post, 'session/:session_id/execute_async'\r\n```\r\n\r\n- selenium-webdriver 3.0 with W3CBridge\r\n\r\n```\r\n        command :getWindowSize, :get, 'session/:session_id/window/size'\r\n        command :getPageSource, :get, '/session/:session_id/source'\r\n        command :executeScript, :post, 'session/:session_id/execute/sync'\r\n        command :executeAsyncScript, :post, 'session/:session_id/execute/async'\r\n```\r\n\r\n---\r\n\r\n## Fixed issues\r\n1. `selenium-webdriver` 3.0 client freeze `Selenium::WebDriver::SearchContext::FINDERS`. But `ruby_lib` extends the attribute. So, I send PR to unfreeze it. If the PR will be rejected, we should implement more.\r\n2. `Selenium::Client` is removed from `selenium-webdriver`. So, re-define iOS error in `ruby_lib`.\r\n3. Not supported and not found routes error with `W3CBridge`\r\n    - Force use `Bridge` to adopt patch to check the capability is W3C or not.\r\n    - Example of logs when use `W3CBridge` as bridge module\r\n        - => https://gist.github.com/KazuCocoa/64546c2f59c79376a05c329ffc89918f\r\n\r\n---\r\n\r\nRoutes\r\n- https://github.com/SeleniumHQ/selenium/blob/ceaf3da79542024becdda5953059dfbb96fb3a90/rb/lib/selenium/webdriver/remote/commands.rb\r\n- https://github.com/SeleniumHQ/selenium/blob/selenium-3.0.0/rb/lib/selenium/webdriver/remote/w3c_commands.rb\r\n\r\n----\r\n\r\nAppium server's routes are based on mobile-json-wire-protocol. So, the commands differ from w3c one."},"comment":{"url":"https://api.github.com/repos/appium/ruby_lib/issues/comments/260103031","html_url":"https://github.com/appium/ruby_lib/pull/383#issuecomment-260103031","issue_url":"https://api.github.com/repos/appium/ruby_lib/issues/383","id":260103031,"user":{"login":"KazuCocoa","id":5511591,"avatar_url":"https://avatars.githubusercontent.com/u/5511591?v=3","gravatar_id":"","url":"https://api.github.com/users/KazuCocoa","html_url":"https://github.com/KazuCocoa","followers_url":"https://api.github.com/users/KazuCocoa/followers","following_url":"https://api.github.com/users/KazuCocoa/following{/other_user}","gists_url":"https://api.github.com/users/KazuCocoa/gists{/gist_id}","starred_url":"https://api.github.com/users/KazuCocoa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KazuCocoa/subscriptions","organizations_url":"https://api.github.com/users/KazuCocoa/orgs","repos_url":"https://api.github.com/users/KazuCocoa/repos","events_url":"https://api.github.com/users/KazuCocoa/events{/privacy}","received_events_url":"https://api.github.com/users/KazuCocoa/received_events","type":"User","site_admin":false},"created_at":"2016-11-12T05:26:44Z","updated_at":"2016-11-12T05:26:44Z","body":"@jlipps ^ the above comments is what you wanted ? Could you check again ? 🙇 "}}
{"actor":{"display_login":"KazuCocoa"}}