예제 #1
0
    def clear(self):
        """ Remove the existing code """

        tools.waitReadyForInput(self.__codeEditorWebElement)

        self.__codeEditorWebElement.send_keys(Keys.CONTROL + "a")
        self.__codeEditorWebElement.send_keys(Keys.DELETE)
예제 #2
0
파일: __init__.py 프로젝트: Yadoms/yadoms
 def clear(self):
    """ Remove the existing code """
 
    tools.waitReadyForInput(self.__codeEditorWebElement)
    
    self.__codeEditorWebElement.send_keys(Keys.CONTROL + "a")
    self.__codeEditorWebElement.send_keys(Keys.DELETE)
예제 #3
0
 def updateTextField(self, field, value):
     field = ConfigurationPanel(
         self.__configureKeywordModalWebElement).getTextItemByName(field)
     tools.waitReadyForInput(field)
     field.send_keys(Keys.CONTROL + "a")
     field.send_keys(Keys.DELETE)
     field.send_keys(value)
예제 #4
0
    def writeCode(self, code):
        """ Write code into codeEditor """
        """ code must be provided as list of code lines """

        tools.waitReadyForInput(self.__codeEditorWebElement)

        # Need a workaround for Selenium bug #1723 (Left parenthesis don't work, see https://code.google.com/p/selenium/issues/detail?id=1723)
        for codeLine in code:
            self.__codeEditorWebElement.send_keys(codeLine)
            self.__writeCR(codeLine)
예제 #5
0
    def writeCode(self, code):
        """ Write code into codeEditor """
        """ code must be provided as list of code lines """

        tools.waitReadyForInput(self.__codeEditorWebElement)

        # Need a workaround for Selenium bug #1723 (Left parenthesis don't work, see https://code.google.com/p/selenium/issues/detail?id=1723)
        for codeLine in code:
            if ('(' in codeLine):
                subStrings = codeLine.split("(")
                for subString in subStrings[:-1]:
                    self.__codeEditorWebElement.send_keys(subString)
                    self.__codeEditorWebElement.send_keys(Keys.SHIFT + "9")
                self.__codeEditorWebElement.send_keys(subStrings[-1])
                self.__writeCR(codeLine)
            else:
                self.__codeEditorWebElement.send_keys(codeLine)
                self.__writeCR(codeLine)
예제 #6
0
파일: __init__.py 프로젝트: Yadoms/yadoms
   def writeCode(self, code):
      """ Write code into codeEditor """
      """ code must be provided as list of code lines """

      tools.waitReadyForInput(self.__codeEditorWebElement)
   
      # Need a workaround for Selenium bug #1723 (Left parenthesis don't work, see https://code.google.com/p/selenium/issues/detail?id=1723)
      for codeLine in code:
         if ('(' in codeLine):
            subStrings = codeLine.split("(")
            for subString in subStrings[:-1]:
               self.__codeEditorWebElement.send_keys(subString)
               self.__codeEditorWebElement.send_keys(Keys.SHIFT + "9")
            self.__codeEditorWebElement.send_keys(subStrings[-1])
            self.__writeCR(codeLine)
         else:
            self.__codeEditorWebElement.send_keys(codeLine)
            self.__writeCR(codeLine)
예제 #7
0
 def setPluginName(self, newName):
     tools.waitReadyForInput(self.getPluginName())
     nameField = self.getPluginName()
     nameField.send_keys(Keys.CONTROL + "a")
     nameField.send_keys(Keys.DELETE)
     nameField.send_keys(newName)
예제 #8
0
 def setDeviceModel(self, newModel):
     tools.waitReadyForInput(self.getDeviceName())
     nameField = self.getDeviceModel()
     nameField.send_keys(Keys.CONTROL + "a")
     nameField.send_keys(Keys.DELETE)
     nameField.send_keys(newModel)
예제 #9
0
파일: __init__.py 프로젝트: Yadoms/yadoms
 def setPluginName(self, newName):
    tools.waitReadyForInput(self.getPluginName())
    nameField = self.getPluginName()
    nameField.send_keys(Keys.CONTROL + "a")
    nameField.send_keys(Keys.DELETE)
    nameField.send_keys(newName)
예제 #10
0
 def setBasicAuthenticationVerifyPassword(self, newValue):
    tools.waitReadyForInput(self.getBasicAuthenticationVerifyPassword())
    field = self.getBasicAuthenticationVerifyPassword()
    field.send_keys(Keys.CONTROL + "a")
    field.send_keys(Keys.DELETE)
    field.send_keys(newValue)