Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
as fill is the official method, renaming the method to fill and alias…
…ing it to the deprecated fill_in
  • Loading branch information
fabiomcosta committed Apr 10, 2011
1 parent 431005a commit d130b2c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions splinter/driver/webdriver/__init__.py
Expand Up @@ -135,7 +135,7 @@ def is_element_not_present_by_id(self, id):
def switch_to_frame(self, id):
self.driver.switch_to_frame(id)

@contextmanager
@contextmanager
def get_iframe(self, id):
self.driver.switch_to_frame(id)
try:
Expand Down Expand Up @@ -189,11 +189,11 @@ def find_by_tag(self, tag):
def find_by_id(self, id):
return self.find_by(self.driver.find_element_by_id, id)

def fill_in(self, name, value):
def fill(self, name, value):
field = self.find_by_name(name).first
field.value = value

fill = fill_in
fill_in = fill
attach_file = fill

def choose(self, name):
Expand Down
4 changes: 2 additions & 2 deletions splinter/driver/zopetestbrowser.py
Expand Up @@ -90,10 +90,10 @@ def find_link_by_text(self, text):
def find_link_by_href(self, href):
return self._find_links_by_xpath("//a[@href='%s']" % href)

def fill_in(self, name, value):
def fill(self, name, value):
self.find_by_name(name=name).first._control.value = value

fill = fill_in
fill_in = fill

def choose(self, name):
control = self._browser.getControl(name=name)
Expand Down

0 comments on commit d130b2c

Please sign in to comment.