How to use findItemsByOcrWRAP method in fMBT

Best Python code snippet using fMBT_python

fmbtgti.py

Source:fmbtgti.py Github

copy

Full Screen

...2165 loggerSelf.logReturn([str(quiItem) for quiItem in retval], img=highlightFilename, width=loggerSelf._screenshotWidth, tip=origMethod.func_name, imgTip=screenshotObj._logCallReturnValue)2166 return retval2167 return findItemsByBitmapWRAP2168 def findItemsByOcrLogger(loggerSelf, origMethod, screenshotObj):2169 def findItemsByOcrWRAP(*args, **kwargs):2170 loggerSelf.logCall()2171 retval = loggerSelf.doCallLogException(origMethod, args, kwargs)2172 if len(retval) == 0:2173 loggerSelf.logReturn("not found in words " + str(screenshotObj.dumpOcrWords()),2174 img=screenshotObj, tip=origMethod.func_name)2175 else:2176 foundItem = retval[0]2177 screenshotFilename = screenshotObj.filename()2178 highlightFilename = loggerSelf.highlightFilename(screenshotFilename)2179 eyenfinger.drawIcon(screenshotFilename, highlightFilename, args[0], foundItem.bbox())2180 for appearance, foundItem in enumerate(retval[1:42]):2181 eyenfinger.drawIcon(highlightFilename, highlightFilename, str(appearance+1) + ": " + args[0], foundItem.bbox())2182 loggerSelf.logReturn([str(retval[0])], img=highlightFilename, width=loggerSelf._screenshotWidth, tip=origMethod.func_name, imgTip=screenshotObj._logCallReturnValue)2183 return retval...

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