How to use pinchItem method in fMBT

Best Python code snippet using fMBT_python

fmbttizen.py

Source:fmbttizen.py Github

copy

Full Screen

...240 oirArgs["limit"] = 1241 items = self._lastScreenshot.findItemsByBitmap(bitmap, **oirArgs)242 if len(items) == 0:243 return False244 return self.pinchItem(items[0], startDistance, endDistance, **pinchArgs)245 def pinchClose(self, (x, y) = (0.5, 0.5), startDistance=0.5, endDistance=0.1, **pinchKwArgs):246 """247 Make the close pinch gesture.248 Parameters:249 x, y (integer, optional):250 the central point of the gesture, the default is in251 the middle of the screen.252 startDistance, endDistance (float, optional):253 refer to pinch documentation. The default is 0.5 and254 0.1.255 rest of the parameters: refer to pinch documentation.256 """257 return self.pinch((x, y), startDistance, endDistance, **pinchKwArgs)258 def pinchItem(self, viewItem, startDistance, endDistance, **pinchKwArgs):259 """260 Pinch the center point of viewItem.261 Parameters:262 viewItem (GUIItem object):263 item to be tapped, possibly returned by264 findItemsBy... methods in Screenshot or View.265 pinchPos (pair of floats (x,y)):266 position to tap, relational to the bitmap.267 (0.0, 0.0) is the top-left corner,268 (1.0, 0.0) is the top-right corner,269 (1.0, 1.0) is the lower-right corner.270 Values < 0 and > 1 tap coordinates outside the item.271 rest of the parameters: refer to pinch documentation.272 """...

Full Screen

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run fMBT automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful