示例#1
0
class User(object):

	def __init__(self, driver):
		self.surrogate=Surrogate(driver)

	# Look for an element
	def sees(self, *exprs):
		return self.surrogate.do("see", exprs)

	# Keyboard type
	def types(self, input, *exprs):
		return self.surrogate.do("type", input, exprs)

	# Mouse click
	def clicks(self, *exprs):
		return self.surrogate.do("click", exprs)

	# Go to address
	def goto(self, url):
		return self.surrogate.do("goto", url)

	# Show history
	def history(self):
		return self.surrogate.history
示例#2
0
	def __init__(self, driver):
		self.surrogate=Surrogate(driver)