{"action":"created","comment":{"url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/comments/303989404","pull_request_review_id":262518666,"id":303989404,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwMzk4OTQwNA==","diff_hunk":"@@ -117,7 +123,11 @@ + (XCUIElementType)elementTypeWithTypeName:(NSString *)typeName\n   [self createMapping];\n   NSNumber *type = StringToElementTypeMapping[typeName];\n   if (!type) {\n-    NSString *reason = [NSString stringWithFormat:@\"Invalid argument for class used '%@'. Did you mean XCUIElementType%@?\", typeName, typeName];\n+    if ([typeName hasPrefix:(NSString *)FB_ELEMENT_TYPE_PREFIX] && typeName.length > FB_ELEMENT_TYPE_PREFIX.length) {\n+      [FBLogger logFmt:@\"Mapping an unknown element type '%@' to XCUIElementTypeOther. Consider reviewing the ElementTypeToStringMapping\", typeName];\n+      return XCUIElementTypeOther;\n+    }\n+    NSString *reason = [NSString stringWithFormat:@\"Invalid argument for class used '%@'. Did you mean %@%@?\", typeName, FB_ELEMENT_TYPE_PREFIX, typeName];","path":"WebDriverAgentLib/Utilities/FBElementTypeTransformer.m","position":35,"original_position":35,"commit_id":"1d1a6c150cecd16a7c3c6bac4c3953389a50c756","original_commit_id":"1d1a6c150cecd16a7c3c6bac4c3953389a50c756","user":{"login":"KazuCocoa","id":5511591,"node_id":"MDQ6VXNlcjU1MTE1OTE=","avatar_url":"https://avatars3.githubusercontent.com/u/5511591?v=4","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},"body":"interesting...\r\nWhat about adding a message like \"Please tell Appium developers from https://github.com/appium/appium/issues/new about the new type\"?","created_at":"2019-07-16T15:54:15Z","updated_at":"2019-07-16T15:54:38Z","html_url":"https://github.com/appium/WebDriverAgent/pull/189#discussion_r303989404","pull_request_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/comments/303989404"},"html":{"href":"https://github.com/appium/WebDriverAgent/pull/189#discussion_r303989404"},"pull_request":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189"}}},"pull_request":{"url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189","id":298093311,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk4MDkzMzEx","html_url":"https://github.com/appium/WebDriverAgent/pull/189","diff_url":"https://github.com/appium/WebDriverAgent/pull/189.diff","patch_url":"https://github.com/appium/WebDriverAgent/pull/189.patch","issue_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/189","number":189,"state":"open","locked":false,"title":"Properly handle newly added element types in newer Xcode versions","user":{"login":"mykola-mokhnach","id":7767781,"node_id":"MDQ6VXNlcjc3Njc3ODE=","avatar_url":"https://avatars1.githubusercontent.com/u/7767781?v=4","gravatar_id":"","url":"https://api.github.com/users/mykola-mokhnach","html_url":"https://github.com/mykola-mokhnach","followers_url":"https://api.github.com/users/mykola-mokhnach/followers","following_url":"https://api.github.com/users/mykola-mokhnach/following{/other_user}","gists_url":"https://api.github.com/users/mykola-mokhnach/gists{/gist_id}","starred_url":"https://api.github.com/users/mykola-mokhnach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mykola-mokhnach/subscriptions","organizations_url":"https://api.github.com/users/mykola-mokhnach/orgs","repos_url":"https://api.github.com/users/mykola-mokhnach/repos","events_url":"https://api.github.com/users/mykola-mokhnach/events{/privacy}","received_events_url":"https://api.github.com/users/mykola-mokhnach/received_events","type":"User","site_admin":false},"body":"Apple keeps adding new element types to XCUIElementType enumeration. And since there is no way in Objective C to get a string representation of an enum item, we need to do such mapping on our own and also update it manually when a new element type(s) are getting added. \r\nThis PR relaxes the logic for type number to name conversion and simply returns `XCUIElementTypeOther` for newly added unknown types, which are not in the mapping yet. This prevents WDA from unexpected crashes, although it still does not release us from adding of new type names into the mapping. \r\n\r\nRelated to https://github.com/appium/WebDriverAgent/pull/188","created_at":"2019-07-16T15:21:36Z","updated_at":"2019-07-16T15:54:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdf572160a590ff1371ff6aa4deda6f5db8adc9a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189/commits","review_comments_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189/comments","review_comment_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/189/comments","statuses_url":"https://api.github.com/repos/appium/WebDriverAgent/statuses/1d1a6c150cecd16a7c3c6bac4c3953389a50c756","head":{"label":"appium:stringtypes","ref":"stringtypes","sha":"1d1a6c150cecd16a7c3c6bac4c3953389a50c756","user":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":84954452,"node_id":"MDEwOlJlcG9zaXRvcnk4NDk1NDQ1Mg==","name":"WebDriverAgent","full_name":"appium/WebDriverAgent","private":false,"owner":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appium/WebDriverAgent","description":"A WebDriver server for iOS that runs inside the Simulator.","fork":true,"url":"https://api.github.com/repos/appium/WebDriverAgent","forks_url":"https://api.github.com/repos/appium/WebDriverAgent/forks","keys_url":"https://api.github.com/repos/appium/WebDriverAgent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/WebDriverAgent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/WebDriverAgent/teams","hooks_url":"https://api.github.com/repos/appium/WebDriverAgent/hooks","issue_events_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/events{/number}","events_url":"https://api.github.com/repos/appium/WebDriverAgent/events","assignees_url":"https://api.github.com/repos/appium/WebDriverAgent/assignees{/user}","branches_url":"https://api.github.com/repos/appium/WebDriverAgent/branches{/branch}","tags_url":"https://api.github.com/repos/appium/WebDriverAgent/tags","blobs_url":"https://api.github.com/repos/appium/WebDriverAgent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/WebDriverAgent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/WebDriverAgent/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/WebDriverAgent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/WebDriverAgent/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/WebDriverAgent/languages","stargazers_url":"https://api.github.com/repos/appium/WebDriverAgent/stargazers","contributors_url":"https://api.github.com/repos/appium/WebDriverAgent/contributors","subscribers_url":"https://api.github.com/repos/appium/WebDriverAgent/subscribers","subscription_url":"https://api.github.com/repos/appium/WebDriverAgent/subscription","commits_url":"https://api.github.com/repos/appium/WebDriverAgent/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/WebDriverAgent/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/WebDriverAgent/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/WebDriverAgent/contents/{+path}","compare_url":"https://api.github.com/repos/appium/WebDriverAgent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/WebDriverAgent/merges","archive_url":"https://api.github.com/repos/appium/WebDriverAgent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/WebDriverAgent/downloads","issues_url":"https://api.github.com/repos/appium/WebDriverAgent/issues{/number}","pulls_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/WebDriverAgent/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/WebDriverAgent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/WebDriverAgent/labels{/name}","releases_url":"https://api.github.com/repos/appium/WebDriverAgent/releases{/id}","deployments_url":"https://api.github.com/repos/appium/WebDriverAgent/deployments","created_at":"2017-03-14T13:50:31Z","updated_at":"2019-07-15T07:04:26Z","pushed_at":"2019-07-16T15:21:36Z","git_url":"git://github.com/appium/WebDriverAgent.git","ssh_url":"git@github.com:appium/WebDriverAgent.git","clone_url":"https://github.com/appium/WebDriverAgent.git","svn_url":"https://github.com/appium/WebDriverAgent","homepage":null,"size":17101,"stargazers_count":70,"watchers_count":70,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":61,"open_issues":3,"watchers":70,"default_branch":"master"}},"base":{"label":"appium:master","ref":"master","sha":"74fac681e870114bc2656502f90a0eaa6d073499","user":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"repo":{"id":84954452,"node_id":"MDEwOlJlcG9zaXRvcnk4NDk1NDQ1Mg==","name":"WebDriverAgent","full_name":"appium/WebDriverAgent","private":false,"owner":{"login":"appium","id":3221291,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyMjEyOTE=","avatar_url":"https://avatars2.githubusercontent.com/u/3221291?v=4","gravatar_id":"","url":"https://api.github.com/users/appium","html_url":"https://github.com/appium","followers_url":"https://api.github.com/users/appium/followers","following_url":"https://api.github.com/users/appium/following{/other_user}","gists_url":"https://api.github.com/users/appium/gists{/gist_id}","starred_url":"https://api.github.com/users/appium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appium/subscriptions","organizations_url":"https://api.github.com/users/appium/orgs","repos_url":"https://api.github.com/users/appium/repos","events_url":"https://api.github.com/users/appium/events{/privacy}","received_events_url":"https://api.github.com/users/appium/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/appium/WebDriverAgent","description":"A WebDriver server for iOS that runs inside the Simulator.","fork":true,"url":"https://api.github.com/repos/appium/WebDriverAgent","forks_url":"https://api.github.com/repos/appium/WebDriverAgent/forks","keys_url":"https://api.github.com/repos/appium/WebDriverAgent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/appium/WebDriverAgent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/appium/WebDriverAgent/teams","hooks_url":"https://api.github.com/repos/appium/WebDriverAgent/hooks","issue_events_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/events{/number}","events_url":"https://api.github.com/repos/appium/WebDriverAgent/events","assignees_url":"https://api.github.com/repos/appium/WebDriverAgent/assignees{/user}","branches_url":"https://api.github.com/repos/appium/WebDriverAgent/branches{/branch}","tags_url":"https://api.github.com/repos/appium/WebDriverAgent/tags","blobs_url":"https://api.github.com/repos/appium/WebDriverAgent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/appium/WebDriverAgent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/appium/WebDriverAgent/git/refs{/sha}","trees_url":"https://api.github.com/repos/appium/WebDriverAgent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/appium/WebDriverAgent/statuses/{sha}","languages_url":"https://api.github.com/repos/appium/WebDriverAgent/languages","stargazers_url":"https://api.github.com/repos/appium/WebDriverAgent/stargazers","contributors_url":"https://api.github.com/repos/appium/WebDriverAgent/contributors","subscribers_url":"https://api.github.com/repos/appium/WebDriverAgent/subscribers","subscription_url":"https://api.github.com/repos/appium/WebDriverAgent/subscription","commits_url":"https://api.github.com/repos/appium/WebDriverAgent/commits{/sha}","git_commits_url":"https://api.github.com/repos/appium/WebDriverAgent/git/commits{/sha}","comments_url":"https://api.github.com/repos/appium/WebDriverAgent/comments{/number}","issue_comment_url":"https://api.github.com/repos/appium/WebDriverAgent/issues/comments{/number}","contents_url":"https://api.github.com/repos/appium/WebDriverAgent/contents/{+path}","compare_url":"https://api.github.com/repos/appium/WebDriverAgent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/appium/WebDriverAgent/merges","archive_url":"https://api.github.com/repos/appium/WebDriverAgent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/appium/WebDriverAgent/downloads","issues_url":"https://api.github.com/repos/appium/WebDriverAgent/issues{/number}","pulls_url":"https://api.github.com/repos/appium/WebDriverAgent/pulls{/number}","milestones_url":"https://api.github.com/repos/appium/WebDriverAgent/milestones{/number}","notifications_url":"https://api.github.com/repos/appium/WebDriverAgent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/appium/WebDriverAgent/labels{/name}","releases_url":"https://api.github.com/repos/appium/WebDriverAgent/releases{/id}","deployments_url":"https://api.github.com/repos/appium/WebDriverAgent/deployments","created_at":"2017-03-14T13:50:31Z","updated_at":"2019-07-15T07:04:26Z","pushed_at":"2019-07-16T15:21:36Z","git_url":"git://github.com/appium/WebDriverAgent.git","ssh_url":"git@github.com:appium/WebDriverAgent.git","clone_url":"https://github.com/appium/WebDriverAgent.git","svn_url":"https://github.com/appium/WebDriverAgent","homepage":null,"size":17101,"stargazers_count":70,"watchers_count":70,"language":"Objective-C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":3,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":61,"open_issues":3,"watchers":70,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189"},"html":{"href":"https://github.com/appium/WebDriverAgent/pull/189"},"issue":{"href":"https://api.github.com/repos/appium/WebDriverAgent/issues/189"},"comments":{"href":"https://api.github.com/repos/appium/WebDriverAgent/issues/189/comments"},"review_comments":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189/comments"},"review_comment":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/appium/WebDriverAgent/pulls/189/commits"},"statuses":{"href":"https://api.github.com/repos/appium/WebDriverAgent/statuses/1d1a6c150cecd16a7c3c6bac4c3953389a50c756"}},"author_association":"NONE"}}
{"actor":{"display_login":"KazuCocoa"}}