Commit ca2efc11 authored by Robert Poienar's avatar Robert Poienar

change variables name for request_separator, request_end and device_id

parent 819bc709
......@@ -47,23 +47,23 @@ class AltElement(object):
def get_component_property(self, component_name, property_name, assembly_name=''):
alt_object = self.toJSON()
return GetComponentProperty(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,component_name,property_name,assembly_name,alt_object).execute()
return GetComponentProperty(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,component_name,property_name,assembly_name,alt_object).execute()
def set_component_property(self, component_name, property_name, value, assembly_name=''):
alt_object = self.toJSON()
return SetComponentProperty(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,component_name,property_name,value,assembly_name,alt_object).execute()
return SetComponentProperty(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,component_name,property_name,value,assembly_name,alt_object).execute()
def call_component_method(self, component_name, method_name, parameters,assembly_name='',type_of_parameters=''):
alt_object = self.toJSON()
return CallComponentMethodForObject(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,component_name,method_name,parameters,assembly_name,type_of_parameters,alt_object).execute()
return CallComponentMethodForObject(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,component_name,method_name,parameters,assembly_name,type_of_parameters,alt_object).execute()
def get_text(self):
alt_object = self.toJSON()
return GetText(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return GetText(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def click_Event(self):
alt_object = self.toJSON()
return ClickEvent(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return ClickEvent(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def mobile_tap(self, durationInSeconds=0.5):
self.appium_driver.tap([[float(self.x), float(self.mobileY)]], durationInSeconds * 1000)
......@@ -76,28 +76,28 @@ class AltElement(object):
def drag(self, x, y):
alt_object = self.toJSON()
return Drag(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,x,y,alt_object).execute()
return Drag(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,x,y,alt_object).execute()
def drop(self, x, y):
alt_object = self.toJSON()
return Drop(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,x,y,alt_object).execute()
return Drop(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,x,y,alt_object).execute()
def pointer_up(self):
alt_object = self.toJSON()
return PointerUp(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return PointerUp(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def pointer_down(self):
alt_object = self.toJSON()
return PointerDown(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return PointerDown(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def pointer_enter(self):
alt_object = self.toJSON()
return PointerEnter(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return PointerEnter(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def pointer_exit(self):
alt_object = self.toJSON()
return PointerExit(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return PointerExit(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
def tap(self):
alt_object=self.toJSON()
return Tap(self.alt_unity_driver.socket,self.alt_unity_driver.requestSeparator,self.alt_unity_driver.requestEnd,alt_object).execute()
return Tap(self.alt_unity_driver.socket,self.alt_unity_driver.request_separator,self.alt_unity_driver.request_end,alt_object).execute()
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
from altunityrunner.by import By
class FindObject(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,by,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,by,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
from altunityrunner.by import By
class FindObjectWhichContains(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,by,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,by,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
from altunityrunner.by import By
class FindObjects(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,by,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,by,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
from altunityrunner.by import By
class FindObjectsWhichContains(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,by,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,by,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
from altunityrunner.commands.base_command import BaseCommand
class GetAllElements(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.camera_name=camera_name
self.enabled=enabled
......
......@@ -2,8 +2,8 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.altUnityExceptions import WaitTimeOutException
import time
class WaitForObject(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
......@@ -2,8 +2,8 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.altUnityExceptions import WaitTimeOutException
import time
class WaitForObjectToNotBePresent(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
......@@ -2,8 +2,8 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.altUnityExceptions import WaitTimeOutException
import time
class WaitForObjectWhichContains(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, by,value,camera_name, timeout, interval,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.camera_name=camera_name
......
......@@ -2,8 +2,8 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.altUnityExceptions import WaitTimeOutException
import time
class WaitForObjectWithText(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, by,value,text,camera_name, timeout, interval,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, by,value,text,camera_name, timeout, interval,enabled):
super().__init__(socket,request_separator,request_end)
self.by=by
self.value=value
self.text=text
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class ClickAtCoordinates(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, x, y):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, x, y):
super().__init__(socket,request_separator,request_end)
self.x=x
self.y=y
......
from altunityrunner.commands.base_command import BaseCommand
class MoveMouse(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd, x, y, duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, x, y, duration):
super().__init__(socket,request_separator,request_end)
self.x=x
self.y=y
self.duration=duration
......
......@@ -2,14 +2,14 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.commands.InputActions.move_mouse import MoveMouse
import time
class MoveMouseAndWait(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, x, y, duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, x, y, duration):
super().__init__(socket,request_separator,request_end)
self.x=x
self.y=y
self.duration=duration
def execute(self):
data = MoveMouse(self.socket,self.requestSeparator,self.requestEnd,self.x, self.y, self.duration).execute()
data = MoveMouse(self.socket,self.request_separator,self.request_end,self.x, self.y, self.duration).execute()
self.handle_errors(data)
print('Wait for move mouse to finish')
time.sleep(self.duration)
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
import time
class PressKey(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, keyName,power,duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, keyName,power,duration):
super().__init__(socket,request_separator,request_end)
self.keyName=keyName
self.power=power
self.duration=duration
......
......@@ -2,14 +2,14 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.commands.InputActions.press_key import PressKey
import time
class PressKeyAndWait(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, keyName,power,duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, keyName,power,duration):
super().__init__(socket,request_separator,request_end)
self.keyName=keyName
self.power=power
self.duration=duration
def execute(self):
data = PressKey(self.socket,self.requestSeparator,self.requestEnd,self.keyName,self.power,self.duration).execute()
data = PressKey(self.socket,self.request_separator,self.request_end,self.keyName,self.power,self.duration).execute()
self.handle_errors(data)
print('Wait for press key to finish')
time.sleep(self.duration)
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
import time
class ScrollMouse(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, speed, duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, speed, duration):
super().__init__(socket,request_separator,request_end)
self.speed=speed
self.duration=duration
......
......@@ -2,13 +2,13 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.commands.InputActions.scroll_mouse import ScrollMouse
import time
class ScrollMouseAndWait(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd, speed, duration):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end, speed, duration):
super().__init__(socket,request_separator,request_end)
self.speed=speed
self.duration=duration
def execute(self):
data = ScrollMouse(self.socket,self.requestSeparator,self.requestEnd,self.speed, self.duration).execute()
data = ScrollMouse(self.socket,self.request_separator,self.request_end,self.speed, self.duration).execute()
self.handle_errors(data)
print('Wait for scroll mouse to finish')
time.sleep(self.duration)
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class Swipe(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,x_start, y_start, x_end, y_end, duration_in_secs):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,x_start, y_start, x_end, y_end, duration_in_secs):
super().__init__(socket,request_separator,request_end)
self.x_start=x_start
self.y_start=y_start
self.x_end=x_end
......
......@@ -2,8 +2,8 @@ from altunityrunner.commands.command_returning_alt_elements import CommandReturn
from altunityrunner.commands.InputActions.swipe import Swipe
import time
class SwipeAndWait(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,x_start, y_start, x_end, y_end, duration_in_secs):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,x_start, y_start, x_end, y_end, duration_in_secs):
super().__init__(socket,request_separator,request_end)
self.x_start=x_start
self.y_start=y_start
self.x_end=x_end
......@@ -11,7 +11,7 @@ class SwipeAndWait(CommandReturningAltElements):
self.duration_in_secs=duration_in_secs
def execute(self):
data = Swipe(self.socket,self.requestSeparator,self.requestEnd,self.x_start, self.y_start, self.x_end, self.y_end, self.duration_in_secs).execute()
data = Swipe(self.socket,self.request_separator,self.request_end,self.x_start, self.y_start, self.x_end, self.y_end, self.duration_in_secs).execute()
self.handle_errors(data)
print('Wait for swipe to finish')
time.sleep(self.duration_in_secs)
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class TapAtCoordinates(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,x,y):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,x,y):
super().__init__(socket,request_separator,request_end)
self.x=x
self.y=y
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
import time
class Tilt(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,x, y, z):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,x, y, z):
super().__init__(socket,request_separator,request_end)
self.x=x
self.y=y
self.z=z
......
from altunityrunner.commands.base_command import BaseCommand
class CallComponentMethodForObject(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,component_name,method_name,parameters,assembly_name,type_of_parameters,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,component_name,method_name,parameters,assembly_name,type_of_parameters,alt_object):
super().__init__(socket,request_separator,request_end)
self.component_name=component_name
self.method_name=method_name
self.parameters=parameters
......
from altunityrunner.commands.base_command import BaseCommand
class CallStaticMethods(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,type_name, method_name, parameters, type_of_parameters = '',assembly=''):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,type_name, method_name, parameters, type_of_parameters = '',assembly=''):
super().__init__(socket,request_separator,request_end)
self.type_name=type_name
self.method_name=method_name
self.parameters=parameters
......
from altunityrunner.commands.base_command import BaseCommand
class ClickEvent(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class Drag(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd,x,y)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end,x,y)
self.x=x
self.y=y
self.alt_object=alt_object
......
from altunityrunner.commands.base_command import BaseCommand
class Drop(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd,x,y)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end,x,y)
self.x=x
self.y=y
self.alt_object=alt_object
......
from altunityrunner.commands.base_command import BaseCommand
class GetComponentProperty(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,component_name, property_name, assembly_name,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,component_name, property_name, assembly_name,alt_object):
super().__init__(socket,request_separator,request_end)
self.component_name=component_name
self.property_name=property_name
self.assembly_name=assembly_name
......
from altunityrunner.commands.base_command import BaseCommand
class GetText(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class PointerDown(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class PointerEnter(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class PointerExit(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class PointerUp(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.base_command import BaseCommand
class SetComponentProperty(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,component_name, property_name,value, assembly_name,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,component_name, property_name,value, assembly_name,alt_object):
super().__init__(socket,request_separator,request_end)
self.component_name=component_name
self.property_name=property_name
self.value=value
......
from altunityrunner.commands.base_command import BaseCommand
class Tap(BaseCommand):
def __init__(self, socket,requestSeparator,requestEnd,alt_object):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,alt_object):
super().__init__(socket,request_separator,request_end)
self.alt_object=alt_object
def execute(self):
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElement(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.value=value
self.camera_name=camera_name
self.enabled=enabled
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElementByComponent(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,component_name,assembly_name,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,component_name,assembly_name,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.component_name=component_name
self.assembly_name=assembly_name
self.camera_name=camera_name
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElementWhereNameContains(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.value=value
self.camera_name=camera_name
self.enabled=enabled
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElements(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.value=value
self.camera_name=camera_name
self.enabled=enabled
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElementsByComponent(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,component_name,assembly_name,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,component_name,assembly_name,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.component_name=component_name
self.assembly_name=assembly_name
self.camera_name=camera_name
......
from altunityrunner.commands.command_returning_alt_elements import CommandReturningAltElements
class FindElementsWhereNameContains(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,value,camera_name,enabled):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,value,camera_name,enabled):
super().__init__(socket,request_separator,request_end)
self.value=value
self.camera_name=camera_name
self.enabled=enabled
......
......@@ -3,8 +3,8 @@ from altunityrunner.commands.OldFindObjects.find_element import FindElement
from altunityrunner.altUnityExceptions import WaitTimeOutException
import time
class WaitForElement(CommandReturningAltElements):
def __init__(self, socket,requestSeparator,requestEnd,value,camera_name='', timeout=20, interval=0.5,enabled=True):
super().__init__(socket,requestSeparator,requestEnd)
def __init__(self, socket,request_separator,request_end,value,camera_name='', timeout=20, interval=0.5,enabled=True):
super().__init__(socket,request_separator,request_end)
self.value=value
self.camera_name=camera_name
self.timeout=timeout
......@@ -16,7 +16,7 @@ class WaitForElement(CommandReturningAltElements):
alt_element = None
while (t <= self.timeout):
try:
alt_element = FindElement(self.socket,self.requestSeparator,self.requestEnd,self.value,self.camera_name,self.enabled).execute()
alt_element = FindElement(self.socket,self.request_separator,self.request_end,self.value,self.camera_name,self.enabled).execute()
break
except Exception:
print('Waiting for element ' + self.value + '...')
......
......@@ -3,8 +3,8 @@ from altunityrunner.commands.OldFindObjects.find_element import FindElement
from altunityrunner.altUnityExceptions import WaitTimeOutException