{"action":"created","comment":{"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments/31914932","id":31914932,"diff_hunk":"@@ -0,0 +1,76 @@\n+\"\"\"\n+This file models some of the page objects on the Manage People Search Page.  (find_user.html)\n+\"\"\"\n+from selenium.common.exceptions import NoSuchElementException\n+from selenium.webdriver.common.by import By\n+from selenium_tests.manage_people.page_objects.mp_base_page_object import ManagePeopleBasePageObject\n+\n+\n+class SearchLocators(object):\n+    # List of WebElements found on Manage People Search Page (Locators)\n+    # Not all HTML tags are found here, but on a need basis\n+    EMAIL_HUID_TEXTBOX = (By.ID, \"emailHUID\")\n+    SEARCH_BUTTON = (By.ID, \"user_search_button\")\n+    USER_NOT_FOUND_MSG_DIV = (By.ID, \"msg-not-found\")\n+    BACK_TO_MANAGE_PEOPLE_LINK = (By.LINK_TEXT, \"Back to manage people\")\n+\n+\n+class SearchPageObject(ManagePeopleBasePageObject):\n+    \"\"\"\n+    List of services offered on the Search page of Manage People tool\n+    \"\"\"\n+\n+    def is_loaded(self):\n+        \"\"\" docstring \"\"\"\n+\n+        print \"Checking if search page is loaded (current url: %s)...\" % self._driver.current_url\n+\n+        # todo: can we abstract away these try-except blocks?\n+\n+        # frame context stickiness is a bit flaky for some reason; make sure we're in the tool_content frame context\n+        # before checking for elements on the expected\n+        try:\n+            self._driver.switch_to.frame(self._driver.find_element_by_id(\"tool_content\"))\n+            print \"Switched to tool_content frame; current url after switch: %s\" % self._driver.current_url\n+        except NoSuchElementException:\n+            pass  # if tool_content not found, assume we're already in the frame context","path":"selenium_tests/manage_people/page_objects/mp_find_user_page.py","position":36,"original_position":36,"commit_id":"c167d20db4db03c24dedcf1a9b4f686288165d1c","original_commit_id":"c167d20db4db03c24dedcf1a9b4f686288165d1c","user":{"login":"elliottyates","id":8975317,"avatar_url":"https://avatars.githubusercontent.com/u/8975317?v=3","gravatar_id":"","url":"https://api.github.com/users/elliottyates","html_url":"https://github.com/elliottyates","followers_url":"https://api.github.com/users/elliottyates/followers","following_url":"https://api.github.com/users/elliottyates/following{/other_user}","gists_url":"https://api.github.com/users/elliottyates/gists{/gist_id}","starred_url":"https://api.github.com/users/elliottyates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elliottyates/subscriptions","organizations_url":"https://api.github.com/users/elliottyates/orgs","repos_url":"https://api.github.com/users/elliottyates/repos","events_url":"https://api.github.com/users/elliottyates/events{/privacy}","received_events_url":"https://api.github.com/users/elliottyates/received_events","type":"User","site_admin":false},"body":"Yeah, selenium isn't very intuitive. Trying and failing to find `#tool_content` is what got us to the `NoSuchElementException` handling block in the first place (via the `find_element_by_id()` throwing an exception), and Selenium's way, as far as I can tell, of checking if an element _doesn't_ exist is simply to poll the page for a duration of time (which we've already done). So here we're assuming the reason we can't find `#tool_content` is that we're already in the context of `#tool_content` (and won't be able to see it outside the iframe). The subsequent `find_element()` call will fail if that assumption is incorrect.","created_at":"2015-06-08T13:44:42Z","updated_at":"2015-06-08T13:44:42Z","html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273#discussion_r31914932","pull_request_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273","_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments/31914932"},"html":{"href":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273#discussion_r31914932"},"pull_request":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273","id":35959968,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273","diff_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273.diff","patch_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273.patch","issue_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/273","number":273,"state":"open","locked":false,"title":"Feature/selenium manage people test suite jy","user":{"login":"Joy603","id":6032481,"avatar_url":"https://avatars.githubusercontent.com/u/6032481?v=3","gravatar_id":"","url":"https://api.github.com/users/Joy603","html_url":"https://github.com/Joy603","followers_url":"https://api.github.com/users/Joy603/followers","following_url":"https://api.github.com/users/Joy603/following{/other_user}","gists_url":"https://api.github.com/users/Joy603/gists{/gist_id}","starred_url":"https://api.github.com/users/Joy603/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Joy603/subscriptions","organizations_url":"https://api.github.com/users/Joy603/orgs","repos_url":"https://api.github.com/users/Joy603/repos","events_url":"https://api.github.com/users/Joy603/events{/privacy}","received_events_url":"https://api.github.com/users/Joy603/received_events","type":"User","site_admin":false},"body":"This is the page object stuff for the new testing framework.  We like to merge to develop and start writing Selenium tests that will eventually become regression test suites.  Please review and let me know if you have any questions.  This is just a start and future iterations will be made to make the process even better.  Thank you in advance for your help and contribution.","created_at":"2015-05-21T17:53:55Z","updated_at":"2015-06-08T13:44:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"390993e83d4dd400cd7e137a84d6ed2c60b002a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273/commits","review_comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273/comments","review_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/273/comments","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/c167d20db4db03c24dedcf1a9b4f686288165d1c","head":{"label":"Harvard-University-iCommons:feature/selenium_manage_people_test_suite_jy","ref":"feature/selenium_manage_people_test_suite_jy","sha":"c167d20db4db03c24dedcf1a9b4f686288165d1c","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":14696916,"name":"icommons_lti_tools","full_name":"Harvard-University-iCommons/icommons_lti_tools","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","description":"icf@hsph","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/releases{/id}","created_at":"2013-11-25T20:06:20Z","updated_at":"2015-05-01T19:05:11Z","pushed_at":"2015-06-03T18:21:56Z","git_url":"git://github.com/Harvard-University-iCommons/icommons_lti_tools.git","ssh_url":"git@github.com:Harvard-University-iCommons/icommons_lti_tools.git","clone_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools.git","svn_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","homepage":"","size":11315,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"Harvard-University-iCommons:develop","ref":"develop","sha":"34e7df40b5d7c6f244493ebddac1cd82dce68192","user":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"repo":{"id":14696916,"name":"icommons_lti_tools","full_name":"Harvard-University-iCommons/icommons_lti_tools","owner":{"login":"Harvard-University-iCommons","id":1083915,"avatar_url":"https://avatars.githubusercontent.com/u/1083915?v=3","gravatar_id":"","url":"https://api.github.com/users/Harvard-University-iCommons","html_url":"https://github.com/Harvard-University-iCommons","followers_url":"https://api.github.com/users/Harvard-University-iCommons/followers","following_url":"https://api.github.com/users/Harvard-University-iCommons/following{/other_user}","gists_url":"https://api.github.com/users/Harvard-University-iCommons/gists{/gist_id}","starred_url":"https://api.github.com/users/Harvard-University-iCommons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Harvard-University-iCommons/subscriptions","organizations_url":"https://api.github.com/users/Harvard-University-iCommons/orgs","repos_url":"https://api.github.com/users/Harvard-University-iCommons/repos","events_url":"https://api.github.com/users/Harvard-University-iCommons/events{/privacy}","received_events_url":"https://api.github.com/users/Harvard-University-iCommons/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","description":"icf@hsph","fork":false,"url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools","forks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/forks","keys_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/teams","hooks_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/hooks","issue_events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/events{/number}","events_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/events","assignees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/assignees{/user}","branches_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/branches{/branch}","tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/tags","blobs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/{sha}","languages_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/languages","stargazers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/stargazers","contributors_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contributors","subscribers_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscribers","subscription_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/subscription","commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/contents/{+path}","compare_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/merges","archive_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/downloads","issues_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues{/number}","pulls_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls{/number}","milestones_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/milestones{/number}","notifications_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/labels{/name}","releases_url":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/releases{/id}","created_at":"2013-11-25T20:06:20Z","updated_at":"2015-05-01T19:05:11Z","pushed_at":"2015-06-03T18:21:56Z","git_url":"git://github.com/Harvard-University-iCommons/icommons_lti_tools.git","ssh_url":"git@github.com:Harvard-University-iCommons/icommons_lti_tools.git","clone_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools.git","svn_url":"https://github.com/Harvard-University-iCommons/icommons_lti_tools","homepage":"","size":11315,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273"},"html":{"href":"https://github.com/Harvard-University-iCommons/icommons_lti_tools/pull/273"},"issue":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/273"},"comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/Harvard-University-iCommons/icommons_lti_tools/statuses/c167d20db4db03c24dedcf1a9b4f686288165d1c"}}}}