1# This Source Code Form is subject to the terms of the Mozilla Public 2# License, v. 2.0. If a copy of the MPL was not distributed with this 3# file, You can obtain one at http://mozilla.org/MPL/2.0/. 4 5from marionette_driver.by import By 6 7from marionette_harness import MarionetteTestCase 8 9 10class TestElementSize(MarionetteTestCase): 11 def testShouldReturnTheSizeOfALink(self): 12 test_html = self.marionette.absolute_url("testSize.html") 13 self.marionette.navigate(test_html) 14 shrinko = self.marionette.find_element(By.ID, 'linkId') 15 size = shrinko.rect 16 self.assertTrue(size['width'] > 0) 17 self.assertTrue(size['height'] > 0) 18