Esempio n. 1
0
async def test_get_rect(session):
    await session.get('/screenshot/')
    ele = await session.get_element('#rect')
    rect = await ele.get_rect()
    assert rect == Rect(0, 0, 100, 100)
Esempio n. 2
0
 async def get_rect(self):
     data = await self._request(url="/rect", method="GET")
     return Rect(data["x"], data["y"], data["width"], data["height"])
Esempio n. 3
0
 async def get_rect(self):
     location = await self._request(url='/location', method='GET')
     width = await self.get_css_value('width')
     height = await self.get_css_value('height')
     return Rect(location['x'], location['y'], px_to_int(width),
                 px_to_int(height))
Esempio n. 4
0
 async def get_rect(self):
     location = await self._request(url="/location", method="GET")
     width = await self.get_css_value("width")
     height = await self.get_css_value("height")
     return Rect(location["x"], location["y"], px_to_int(width), px_to_int(height))
Esempio n. 5
0
 async def get_rect(self):
     data = await self._request(
         url='/rect',
         method='GET',
     )
     return Rect(data['x'], data['y'], data['width'], data['height'])