lib/page-object/elements/element.rb in page-object-0.4.4 vs lib/page-object/elements/element.rb in page-object-0.5.0

- old
+ new

@@ -1,6 +1,5 @@ -require 'mixology' module PageObject module Elements # # Contains functionality that is common across all elements. @@ -168,16 +167,16 @@ def include_platform_for platform if platform[:platform] == :watir_webdriver require 'page-object/platforms/watir_webdriver/element' require 'page-object/platforms/watir_webdriver/page_object' - self.mixin PageObject::Platforms::WatirWebDriver::Element - @platform = PageObject::Platforms::WatirWebDriver::PageObject.new(@element) + self.class.send :include, ::PageObject::Platforms::WatirWebDriver::Element + @platform = ::PageObject::Platforms::WatirWebDriver::PageObject.new(@element) elsif platform[:platform] == :selenium_webdriver require 'page-object/platforms/selenium_webdriver/element' require 'page-object/platforms/selenium_webdriver/page_object' - self.mixin PageObject::Platforms::SeleniumWebDriver::Element - @platform = PageObject::Platforms::SeleniumWebDriver::PageObject.new(@element) + self.class.send :include, ::PageObject::Platforms::SeleniumWebDriver::Element + @platform = ::PageObject::Platforms::SeleniumWebDriver::PageObject.new(@element) else raise ArgumentError, "expect platform to be :watir_webdriver or :selenium_webdriver" end end end