[Checkins] SVN: gocept.selenium/trunk/src/gocept/selenium/selenese.py added all methods of the selenium RC that are simply passthrough
Wolfgang Schnerring
wosc at wosc.de
Sun Aug 15 10:07:27 EDT 2010
Log message for revision 115686:
added all methods of the selenium RC that are simply passthrough
Changed:
U gocept.selenium/trunk/src/gocept/selenium/selenese.py
-=-
Modified: gocept.selenium/trunk/src/gocept/selenium/selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-08-15 13:00:14 UTC (rev 115685)
+++ gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-08-15 14:07:27 UTC (rev 115686)
@@ -58,6 +58,30 @@
# Actions
+ @passthrough
+ def addLocationStrategy(self, name, definition):
+ pass
+
+ @passthrough
+ def addScript(self, script):
+ pass
+
+ @passthrough
+ def answerOnNextPrompt(self, answer):
+ pass
+
+ @passthrough
+ def assignId(self, locator, id):
+ pass
+
+ @passthrough
+ def allowNativeXpath(self, allow):
+ pass
+
+ @passthrough
+ def ignoreAttributesWithoutValue(self, ignore):
+ pass
+
def pause(self, milliseconds):
time.sleep(milliseconds / 1000.0)
@@ -67,6 +91,9 @@
def waitForPageToLoad(self):
self.selenium.wait_for_page_to_load(self.timeout * 1000)
+ def waitForFrameToLoad(self):
+ self.selenium.wait_for_frame_to_load(self.timeout * 1000)
+
def waitForPopUp(self, windowID=''):
self.selenium.wait_for_pop_up(windowID, self.timeout * 1000)
@@ -82,6 +109,14 @@
self.selenium.do_command("open", [url, ignoreResponseCode])
@passthrough
+ def addCustomRequestHeader(self, key, value):
+ pass
+
+ @passthrough
+ def addSelection(self, locator, optionLocator):
+ pass
+
+ @passthrough
def altKeyDown(self):
pass
@@ -90,6 +125,22 @@
pass
@passthrough
+ def attachFile(self, locator, fileURL):
+ pass
+
+ @passthrough
+ def captureNetworkTraffic(self, type_):
+ pass
+
+ @passthrough
+ def captureScreenshot(self, filename):
+ pass
+
+ @passthrough
+ def captureScreenshotToString(self):
+ pass
+
+ @passthrough
def close(self):
self.selenium.deselectPopUp()
pass
@@ -103,6 +154,10 @@
pass
@passthrough
+ def deleteAllVisibleCookies(self):
+ pass
+
+ @passthrough
def deselectPopUp(self):
pass
@@ -131,6 +186,18 @@
pass
@passthrough
+ def contextMenu(self, locator):
+ pass
+
+ @passthrough
+ def contextMenuAt(self, locator, coordString):
+ pass
+
+ @passthrough
+ def chooseOKOnNextConfirmation(self):
+ pass
+
+ @passthrough
def chooseCancelOnNextConfirmation(self):
pass
@@ -143,10 +210,30 @@
pass
@passthrough
+ def doubleClick(self, locator):
+ pass
+
+ @passthrough
+ def doubleClickAt(self, locator, coordString):
+ pass
+
+ @passthrough
def fireEvent(self, locator, eventName):
pass
@passthrough
+ def focus(self, locator):
+ pass
+
+ @passthrough
+ def goBack(self):
+ pass
+
+ @passthrough
+ def highlight(self, locator):
+ pass
+
+ @passthrough
def keyDown(self, locator, keySequence):
pass
@@ -167,10 +254,26 @@
pass
@passthrough
+ def mouseDown(self, locator):
+ pass
+
+ @passthrough
def mouseDownAt(self, locator, coord):
pass
@passthrough
+ def mouseDownRight(self, locator):
+ pass
+
+ @passthrough
+ def mouseDownRightAt(self, locator, coord):
+ pass
+
+ @passthrough
+ def mouseMove(self, locator):
+ pass
+
+ @passthrough
def mouseMoveAt(self, locator, coord):
pass
@@ -183,26 +286,80 @@
pass
@passthrough
+ def mouseUp(self, locator):
+ pass
+
+ @passthrough
def mouseUpAt(self, locator, coord):
pass
@passthrough
+ def mouseUpRight(self, locator):
+ pass
+
+ @passthrough
+ def mouseUpRightAt(self, locator, coord):
+ pass
+
+ @passthrough
def refresh(self):
pass
@passthrough
- def select(self):
+ def removeAllSelections(self, locator):
pass
@passthrough
+ def removeSelection(self, locator, optionLocator):
+ pass
+
+ @passthrough
+ def removeScript(self, id):
+ pass
+
+ @passthrough
+ def retrieveLastRemoteControlLogs(self):
+ pass
+
+ @passthrough
+ def select(self, locator, optionLocator):
+ pass
+
+ @passthrough
def selectFrame(self):
pass
@passthrough
- def setSpeed(self):
+ def submit(self, locator):
pass
@passthrough
+ def setBrowserLogLevel(self, level):
+ pass
+
+ def getSpeed(self):
+ return int(self.selenium.get_speed())
+
+ @passthrough
+ def setSpeed(self, speed):
+ pass
+
+ def getMouseSpeed(self):
+ return int(self.selenium.get_mouse_speed())
+
+ @passthrough
+ def setMouseSpeed(self, speed):
+ pass
+
+ @passthrough
+ def setContext(self, message):
+ pass
+
+ @passthrough
+ def setCursorPosition(self, locator, position):
+ pass
+
+ @passthrough
def shiftKeyDown(self):
pass
@@ -222,6 +379,22 @@
def runScript(self, script):
pass
+ @passthrough
+ def uncheck(self, locator):
+ pass
+
+ @passthrough
+ def useXpathLibrary(self, name):
+ pass
+
+ @passthrough
+ def windowFocus(self):
+ pass
+
+ @passthrough
+ def windowMaximize(self):
+ pass
+
# Getter
@assert_type('pattern')
@@ -247,18 +420,42 @@
pass
@assert_type('pattern')
+ def getConfirmation(self):
+ if not self.selenium.is_confirmation_present():
+ raise self.failureException(
+ 'No confirmation occured.')
+ return self.selenium.get_confirmation()
+
+ @assert_type('pattern')
@passthrough
- def getConfirmation(self):
+ def getCookie(self):
pass
@assert_type('locator_pattern')
@passthrough
+ def getCookieByName(self, name):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
def getEval(self, script):
# Note: we use the locator_pattern because the script acts like a
# locator: we pass it through and Selenium returns a result we can
# compare with the pattern.
pass
+ @assert_type('pattern')
+ @passthrough
+ def getHtmlSource(self):
+ pass
+
+ @assert_type('pattern')
+ def getPrompt(self):
+ if not self.selenium.is_prompt_present():
+ raise self.failureException(
+ 'No prompt occured.')
+ return self.selenium.get_prompt()
+
@assert_type('locator_pattern')
@passthrough
def getSelectedLabel(self, locator):
@@ -266,19 +463,54 @@
@assert_type('locator_pattern')
@passthrough
+ def getSelectedLabels(self, locator):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
def getSelectedValue(self, locator):
pass
@assert_type('locator_pattern')
@passthrough
+ def getSelectedValues(self, locator):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
def getSelectedIndex(self, locator):
pass
+ @assert_type('locator_pattern')
+ @passthrough
+ def getSelectedIndexes(self, locator):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
+ def getSelectedId(self, locator):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
+ def getSelectedIds(self, locator):
+ pass
+
@assert_type('locator')
@passthrough
+ def isSomethingSelected(self, locator):
+ pass
+
+ @assert_type('locator')
+ @passthrough
def isChecked(self, locator):
pass
+ @assert_type('locator')
+ @passthrough
+ def isCookiePresent(self, name):
+ pass
+
@assert_type('locator_pattern')
@passthrough
def getText(self, locator):
@@ -286,6 +518,11 @@
@assert_type('locator_pattern')
@passthrough
+ def getTable(self, locator):
+ pass
+
+ @assert_type('locator_pattern')
+ @passthrough
def getValue(self, locator):
pass
@@ -294,6 +531,11 @@
def isAlertPresent(self):
pass
+ @assert_type(None)
+ @passthrough
+ def isPromptPresent(self):
+ pass
+
@assert_type('locator')
@passthrough
def isElementPresent(self, locator):
@@ -304,13 +546,23 @@
def isVisible(self, locator):
pass
+ @assert_type('locator')
+ @passthrough
+ def isEditable(self, locator):
+ pass
+
def getElementWidth(self, locator):
return int(self.selenium.get_element_width(locator))
def getElementHeight(self, locator):
return int(self.selenium.get_element_height(locator))
+ @assert_type('locator_pattern')
@passthrough
+ def getExpression(self, expression):
+ pass
+
+ @passthrough
def isTextPresent(self, pattern):
pass
@@ -326,8 +578,6 @@
raise self.failureException('Text %r not present' % pattern)
def assertCondition(self, condition):
- # Extension to selenese API to make automatic `waitForCondition`
- # generation work
# XXX comparing to `true` on a string-exact match might not be a good
# idea as implicit bool conversion might happen in original Selenese.
return self.assertEval(condition, 'exact:true')
More information about the checkins
mailing list