diff --git a/PageObjectLibrary/__init__.py b/PageObjectLibrary/__init__.py index 553632c..1c785a2 100644 --- a/PageObjectLibrary/__init__.py +++ b/PageObjectLibrary/__init__.py @@ -54,7 +54,7 @@ class your keywords have access to the following pre-defined standard Selenium methods provided by the Selenium library. The following example shows how to find all link elements on a page: - | elements = self.browser,find_elements_by_tag_name("a") + | elements = self.browser.find_elements(By.TAG_NAME, "a") = Creating Page Object Classes = diff --git a/PageObjectLibrary/pageobject.py b/PageObjectLibrary/pageobject.py index b6df59d..9b55bc0 100644 --- a/PageObjectLibrary/pageobject.py +++ b/PageObjectLibrary/pageobject.py @@ -9,6 +9,7 @@ from selenium.webdriver.support.expected_conditions import staleness_of from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.common.by import By import six @@ -91,7 +92,7 @@ def _wait_for_page_refresh(self, timeout=10): 2) the javascript document.readyState variable to be set to "complete" """ - old_page = self.browser.find_element_by_tag_name('html') + old_page = self.browser.find_element(By.TAG_NAME, 'html') yield WebDriverWait(self.browser, timeout).until( staleness_of(old_page), diff --git a/doc/pageobjectlibrary.html b/doc/pageobjectlibrary.html index d688e9d..b064d15 100644 --- a/doc/pageobjectlibrary.html +++ b/doc/pageobjectlibrary.html @@ -548,7 +548,7 @@ jQuery.extend({highlight:function(e,t,n,r){if(e.nodeType===3){var i=e.data.match(t);if(i){var s=document.createElement(n||"span");s.className=r||"highlight";var o=e.splitText(i.index);o.splitText(i[0].length);var u=o.cloneNode(true);s.appendChild(u);o.parentNode.replaceChild(s,o);return 1}}else if(e.nodeType===1&&e.childNodes&&!/(script|style)/i.test(e.tagName)&&!(e.tagName===n.toUpperCase()&&e.className===r)){for(var a=0;a