How to use setScreenshotFindBitmapDefaults method in fMBT

Best Python code snippet using fMBT_python

fmbtgti.py

Source:fmbtgti.py Github

copy

Full Screen

...535 findBitmap defaults for this screenshot.536 Notice that there may be many screenshots simultaneously.537 Do not keep reference to the screenshot object.538 """539 self.setScreenshotFindBitmapDefaults(screenshot, **findBitmapDefaults)540 return self._addScreenshot(screenshot, **findBitmapDefaults)541 def _addScreenshot(self, screenshot, **findBitmapDefaults):542 pass543 def removeScreenshot(self, screenshot):544 """545 OIR queries on the screenshot will not be made anymore.546 """547 self._removeScreenshot(screenshot)548 try:549 del self._ssFindBitmapDefaults[id(screenshot)]550 except KeyError:551 raise KeyError('screenshot "%s" does not have findBitmapDefaults. '552 'If OirEngine.addScreenshot() is overridden, it '553 '*must* call parent\'s addScreenshot.' % (screenshot.filename(),))554 def _removeScreenshot(self, screenshot):555 pass556 def setFindBitmapDefaults(self, **findBitmapDefaults):557 return self._setFindBitmapDefaults(findBitmapDefaults, screenshot=None)558 def setScreenshotFindBitmapDefaults(self, screenshot, **findBitmapDefaults):559 return self._setFindBitmapDefaults(findBitmapDefaults, screenshot=screenshot)560 def _setFindBitmapDefaults(self, defaults, screenshot=None):561 """562 Set default values for optional arguments for findBitmap().563 Parameters:564 defaults (dictionary)565 Default keyword arguments and their values.566 screenshot (optional, fmbtgti.Screenshot instance)567 Use the defaults for findBitmap on this screenshot. If568 the defaults are None, make them default for all569 screenshots. Screenshot-specific defaults override570 engine default.571 """572 if screenshot == None:...

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