{"action":"created","issue":{"url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/42","labels_url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/42/comments","events_url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/42/events","html_url":"https://github.com/jollychang/robotframework-appiumlibrary/issues/42","id":59997188,"number":42,"title":"\"Page should contain element\" fails always","user":{"login":"yahman72","id":8724383,"avatar_url":"https://avatars.githubusercontent.com/u/8724383?v=3","gravatar_id":"","url":"https://api.github.com/users/yahman72","html_url":"https://github.com/yahman72","followers_url":"https://api.github.com/users/yahman72/followers","following_url":"https://api.github.com/users/yahman72/following{/other_user}","gists_url":"https://api.github.com/users/yahman72/gists{/gist_id}","starred_url":"https://api.github.com/users/yahman72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahman72/subscriptions","organizations_url":"https://api.github.com/users/yahman72/orgs","repos_url":"https://api.github.com/users/yahman72/repos","events_url":"https://api.github.com/users/yahman72/events{/privacy}","received_events_url":"https://api.github.com/users/yahman72/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-05T18:50:39Z","updated_at":"2015-03-05T19:00:56Z","closed_at":null,"body":"`Page should contain element` fails always with an ` AttributeError: 'module' object has no attribute 'escape_xpath_value'` error\r\n\r\n<pre>\r\n20150305 19:46:57.047 - INFO - +----- START KW: AppiumLibrary.Page Should Contain Element [ com.android.contacts:id/digits ]\r\n20150305 19:46:57.725 - FAIL - AttributeError: 'module' object has no attribute 'escape_xpath_value'\r\n20150305 19:46:57.725 - DEBUG - Traceback (most recent call last):\r\n  File \"<string>\", line 2, in page_should_contain_element\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\keywords\\keywordgroup.py\", line 14, in _run_on_failure_decorator\r\n    return method(*args, **kwargs)\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\keywords\\_element.py\", line 112, in page_should_contain_element\r\n    if not self._is_element_present(locator):\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\keywords\\_element.py\", line 272, in _is_element_present\r\n    elements = self._element_finder.find(application, locator, None)\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\locators\\elementfinder.py\", line 28, in find\r\n    return strategy(browser, criteria, tag, constraints)\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\locators\\elementfinder.py\", line 94, in _find_by_default\r\n    return self._find_by_key_attrs(browser, criteria, tag, constraints)\r\n  File \"C:\\Python27\\lib\\site-packages\\robotframework_appiumlibrary-1.2.4-py2.7.egg\\AppiumLibrary\\locators\\elementfinder.py\", line 101, in _find_by_key_attrs\r\n    xpath_criteria = utils.escape_xpath_value(criteria)\r\n20150305 19:46:57.725 - INFO - +----- END KW: AppiumLibrary.Page Should Contain Element (678)\r\n</pre>\r\n"},"comment":{"url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/comments/77427360","html_url":"https://github.com/jollychang/robotframework-appiumlibrary/issues/42#issuecomment-77427360","issue_url":"https://api.github.com/repos/jollychang/robotframework-appiumlibrary/issues/42","id":77427360,"user":{"login":"yahman72","id":8724383,"avatar_url":"https://avatars.githubusercontent.com/u/8724383?v=3","gravatar_id":"","url":"https://api.github.com/users/yahman72","html_url":"https://github.com/yahman72","followers_url":"https://api.github.com/users/yahman72/followers","following_url":"https://api.github.com/users/yahman72/following{/other_user}","gists_url":"https://api.github.com/users/yahman72/gists{/gist_id}","starred_url":"https://api.github.com/users/yahman72/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yahman72/subscriptions","organizations_url":"https://api.github.com/users/yahman72/orgs","repos_url":"https://api.github.com/users/yahman72/repos","events_url":"https://api.github.com/users/yahman72/events{/privacy}","received_events_url":"https://api.github.com/users/yahman72/received_events","type":"User","site_admin":false},"created_at":"2015-03-05T19:00:55Z","updated_at":"2015-03-05T19:00:55Z","body":"oops - this works fine if you remember to pass the locator strategy to the keyword.\r\nThis fails if you use `com.android.contacts:id/digits` instead of `identifier = com.android.contacts:id/digits`"}}