How to use getActionNames method in fMBT

Best Python code snippet using fMBT_python

SpellUnit.py

Source:SpellUnit.py Github

copy

Full Screen

...349 if not self.inWorld: return350 model = self.getModel()351 if model is None: return352 # ÐÞÕýijЩ¼«¶ËÇé¿ö϶¯×÷»Øµ÷µÄbug353 if actionNames == self.getActionNames() and self.actionCount >= 2:354 actionCount = self.actionCount355 self.onPlayActionOver( actionNames )356 self.actionCount = actionCount - 1 # ¼«¶ËÇé¿öϲ»¼ÆÈëÇåÁãµÄÐòÁÐ357 return358 self.actionRule.onActionOver( actionNames )359 self.onPlayActionOver( actionNames )360 def onPlayActionOver( self, actionNames ):361 """362 ²¥·Å¶¯×÷½áÊøµÄʱºò×öµãʲô...363 """364 self.actionCount = 0365 def getActionNames( self ):366 """367 ·µ»Øµ±Ç°²¥·Å¶¯×÷Áбí368 """369 if not self.inWorld: return []370 return self.actionRule.getActionNames()371 def stopActions( self ):372 """373 define method.374 Í£Ö¹µ±Ç°²¥·ÅµÄ¶¯×÷375 """376 if not self.inWorld: return377 model = self.getModel()378 if model is None: return379 actionNames = self.getActionNames()380 for actionName in actionNames:381 rds.actionMgr.stopAction( model, actionName )382 def isActionning( self ):383 """384 µ±Ç°ÊÇ·ñÔÚ²¥·Å¶¯×÷385 """386 if not self.inWorld: return False387 return self.actionRule.isActionning()388 def onHomingSpellResist( self, targetID ):389 """390 define method.391 Á¬»÷¼¼Äܱ»µÖ¿¹µÄÄ¿±êID392 """393 ECenter.fireEvent( "EVT_ON_SHOW_REST_STATUS", targetID )...

Full Screen

Full Screen

ActionRule.py

Source:ActionRule.py Github

copy

Full Screen

...10 def __init__( self ):11 """12 """13 self.currActionNames = []14 def getActionNames( self ):15 """16 ·µ»Øµ±Ç°²¥·Å¶¯×÷Áбí17 """18 return self.currActionNames19 def isActionning( self ):20 """21 µ±Ç°ÊÇ·ñÔÚ²¥·Å¶¯×÷22 """23 return len( self.currActionNames ) > 024 def checkActionRule( self, actionNames ):25 """26 ¼ì²é¶¯×÷ÁбíÊÇ·ñ·ûºÏ²¥·Å¹æÔò27 param actionName : ¶¯×÷ÃûÁбí28 type actionName : list of string...

Full Screen

Full Screen

metaInfo.py

Source:metaInfo.py Github

copy

Full Screen

...33 if meta and meta.get('actions', None):34 actions = meta['actions'].get('customs', [])35 return utils.lookupItem(actions, lambda action: action['name'] == name)36 return None37def getActionNames(dn): 38 trans = TransId()39 meta = _getMeta(dn, '', trans)40 return map(lambda action: action['name'], meta.get('actions', {}).get('customs', [])) if meta else []41 42def getChildren(dn, transId):43 response = LsExMsg(dn, transId).send()44 return response['children'] if response['result'] == 0 else []45def isDnExist(dn, transId):46 response = LsExMsg(dn, transId).send()47 return response['result'] == 048def makeTree(transId, dn, key = None):49 tree = {}50 children = getChildren(dn, transId)51 childTree = map(lambda x: makeTree(transId, utils.joinDn(dn, x), x), children)...

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