Beispiel #1
0
def Synchronization(
    FindBy,
    Value,
    All=False,
    TimeOutInMin=int(Project.Variables.VariableByName['TimeOutInMin']),
    PollingEveryInSec=int(
        Project.Variables.VariableByName['PollingEveryInSec'])):
    webElement = None
    TimeStarted = DateTime.GetCurrentTime()
    TimeElapsed = str(Project.Variables.VariableByName['TimeElapsed'])
    webElement = WebElement.FindElement(FindBy, Value, All)
    while ((webElement is None) and (int(TimeElapsed) < int(TimeOutInMin))):
        Waiter.Wait(
            PollingEveryInSec, "Waiting for Object, Find By: {" + FindBy +
            "}, Value: {" + Value + "}")
        if (TimeElapsed == 3):
            Log.Message(
                "It's been 3 minutes finding this object, Please check app stat"
            )
        webElement = WebElement.FindElement(FindBy, Value, All)
        TimeElapsed = DateTime.GetTimeDiffInMinutes(TimeStarted,
                                                    DateTime.GetCurrentTime())

    if (webElement == None):
        Log.Error("No Object Found After 5 Min., Find By: {" + FindBy +
                  "}, Value: {" + Value + "}")
    else:
        return webElement
Beispiel #2
0
def Cancel():
  FindBy = GetValueFromOR("Cancel","FindBy");
  Value = GetValueFromOR("Cancel","Value");
  All = GetValueFromOR("Cancel","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  WebObject.focus
  return WebObject
Beispiel #3
0
def UserManagement():
    FindBy = GetValueFromOR("UserManagement", "FindBy")
    Value = GetValueFromOR("UserManagement", "Value")
    All = GetValueFromOR("UserManagement", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    return WebObject
Beispiel #4
0
def ErrorMessage():
    FindBy = GetValueFromOR("ErrMsg", "FindBy")
    Value = GetValueFromOR("ErrMsg", "Value")
    All = GetValueFromOR("ErrMsg", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    return WebObject
Beispiel #5
0
def GetLoginUserName():
    FindBy = GetValueFromOR("Welcome", "FindBy")
    Value = GetValueFromOR("Welcome", "Value")
    All = GetValueFromOR("Welcome", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    return WebObject
Beispiel #6
0
def ErrMsgConfirmPassword():
  FindBy = GetValueFromOR("ErrMsgConfirmPassword","FindBy");
  Value = GetValueFromOR("ErrMsgConfirmPassword","Value");
  All = GetValueFromOR("ErrMsgConfirmPassword","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  WebObject.focus
  return WebObject
Beispiel #7
0
def Login():
    FindBy = GetValueFromOR("Login", "FindBy")
    Value = GetValueFromOR("Login", "Value")
    All = GetValueFromOR("Login", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    return WebObject
Beispiel #8
0
def EmployeeNameList(strEmployeeName):
    FindBy = GetValueFromOR("EmployeeNameList", "FindBy")
    Value = GetValueFromOR("EmployeeNameList", "Value")
    UpdatedValue = aqString.Replace(Value, "TEXT", str(strEmployeeName))
    All = GetValueFromOR("EmployeeNameList", "All")
    WebObject = WebElement.GetWebElement(FindBy, UpdatedValue, All)
    return WebObject
Beispiel #9
0
def ErrMsgUserName():
  FindBy = GetValueFromOR("ErrMsgUserName","FindBy");
  Value = GetValueFromOR("ErrMsgUserName","Value");
  All = GetValueFromOR("ErrMsgUserName","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  WebObject.focus
  return WebObject
Beispiel #10
0
def Status():
  FindBy = GetValueFromOR("Status","FindBy");
  Value = GetValueFromOR("Status","Value");
  All = GetValueFromOR("Status","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  WebObject.focus
  return WebObject;
Beispiel #11
0
def RowCount(columnIndex):
    FindBy = GetValueFromOR("RowCount", "FindBy")
    Value = GetValueFromOR("RowCount", "Value")
    UpdatedValue = aqString.Replace(Value, "COLUMNINDEX", str(columnIndex))
    All = GetValueFromOR("RowCount", "All")
    WebObject = WebElement.GetWebElement(FindBy, UpdatedValue, All)
    return WebObject
Beispiel #12
0
def LastRecord(columnIndex):
    FindBy = GetValueFromOR("LastRecord", "FindBy")
    Value = GetValueFromOR("LastRecord", "Value")
    UpdatedValue = aqString.Replace(Value, "COLUMNINDEX", str(columnIndex))
    All = GetValueFromOR("LastRecord", "All")
    WebObject = WebElement.GetWebElement(FindBy, UpdatedValue, All)
    WebObject.focus
    return WebObject
Beispiel #13
0
def Password():
    FindBy = GetValueFromOR("Password", "FindBy")
    Value = GetValueFromOR("Password", "Value")
    All = GetValueFromOR("Password", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    WebObject.value = ""
    WebObject.Click()
    return WebObject
Beispiel #14
0
def EmployeeName():
    FindBy = GetValueFromOR("EmployeeName", "FindBy")
    Value = GetValueFromOR("EmployeeName", "Value")
    All = GetValueFromOR("EmployeeName", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    WebObject.focus
    WebObject.value = ""
    WebObject.Click()
    return WebObject
Beispiel #15
0
def UserName():
  FindBy = GetValueFromOR("UserName","FindBy");
  Value = GetValueFromOR("UserName","Value");
  All = GetValueFromOR("UserName","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  WebObject.focus
  WebObject.value = ""
  WebObject.Click()
  return WebObject
Beispiel #16
0
def Cell(columnIndex, rowIndex):
    FindBy = GetValueFromOR("Cell", "FindBy")
    Value = GetValueFromOR("Cell", "Value")
    UpdatedValue = aqString.Replace(Value, "COLUMNINDEX", str(columnIndex))
    UpdatedValue2 = aqString.Replace(UpdatedValue, "ROWINDEX", str(rowIndex))
    All = GetValueFromOR("Cell", "All")
    WebObject = WebElement.GetWebElement(FindBy, UpdatedValue2, All)
    WebObject.focus
    return WebObject
Beispiel #17
0
def UserRole():
  FindBy = GetValueFromOR("UserRole","FindBy");
  Value = GetValueFromOR("UserRole","Value");
  All = GetValueFromOR("UserRole","All");
  WebObject = WebElement.GetWebElement(FindBy,Value,All)
  return WebObject
Beispiel #18
0
def UserWebTable():
    FindBy = GetValueFromOR("UserWebTable", "FindBy")
    Value = GetValueFromOR("UserWebTable", "Value")
    All = GetValueFromOR("UserWebTable", "All")
    WebObject = WebElement.GetWebElement(FindBy, Value, All)
    return WebObject