How to use iClickBox method in fMBT

Best Python code snippet using fMBT_python

eyenfinger.py

Source:eyenfinger.py Github

copy

Full Screen

...718 _DEPRECATED()719 score, bbox = iVerifyIcon(iconFilename, match=match,720 colorMatch=colorMatch, opacityLimit=opacityLimit,721 capture=capture, _origin="iClickIcon")722 clickedXY = iClickBox(bbox, clickPos, mouseButton, mouseEvent, dryRun,723 capture, _captureText = iconFilename)724 return (score, clickedXY)725def iClickWord(word, appearance=1, clickPos=(0.5,0.5), match=0.33,726 mouseButton=1, mouseEvent=1, dryRun=None, capture=None):727 """728 DEPRECATED - use fmbtx11.Screen.tapOcrText instead.729 Click coordinates relative to the given word in previously iRead() image.730 Parameters:731 word word that should be clicked732 appearance if word appears many times, appearance to733 be clicked. Defaults to the first one.734 clickPos position to be clicked,735 relative to word top-left corner of the bounding736 box around the word. X and Y units are relative737 to width and height of the box. (0,0) is the738 top-left corner, (1,1) is bottom-right corner,739 (0.5, 0.5) is the middle point (default).740 Values below 0 or greater than 1 click outside741 the bounding box.742 capture name of file where image of highlighted word and743 clicked point are saved.744 Returns pair: ((score, matchingWord), (clickedX, clickedY)), where745 score score of found match (1.0 for perfect match)746 matchingWord corresponding word detected by OCR747 (clickedX, clickedY)748 X and Y coordinates of clicked position on the749 screen.750 Throws BadMatch error if could not find a matching word.751 Throws NoOCRResults error if there are OCR results available752 on the current screen.753 """754 _DEPRECATED()755 (score, matching_word), bbox = iVerifyWord(word, appearance=appearance, match=match, capture=False)756 clickedX, clickedY = iClickBox(bbox, clickPos, mouseButton, mouseEvent, dryRun, capture=False)757 windowId = _g_lastWindow758 _log('iClickWord("%s"): word "%s", match %.2f, bbox %s, window offset %s, click %s' %759 (word, matching_word, score,760 bbox, _g_windowOffsets[windowId],761 (clickedX, clickedY)))762 if capture:763 drawWords(_g_origImage, capture, [word], _g_words)764 drawClickedPoint(capture, capture, (clickedX, clickedY))765 return ((score, matching_word), (clickedX, clickedY))766def iClickBox((left, top, right, bottom), clickPos=(0.5, 0.5),767 mouseButton=1, mouseEvent=1, dryRun=None,768 capture=None, _captureText=None):769 """770 DEPRECATED - use fmbtx11.Screen.tapItem instead.771 Click coordinates relative to the given bounding box, default is772 in the middle of the box.773 Parameters:774 (left, top, right, bottom)775 coordinates of the box inside the window.776 (0, 0) is the top-left corner of the window.777 clickPos (offsetX, offsetY) position to be clicked,778 relative to the given box. (0, 0) is the779 top-left, and (1.0, 1.0) is the lower-right780 corner of the box. The default is (0.5, 0.5),...

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