Skip to content

Commit

Permalink
ADX-199 Adjusted selenium test login functionality to better select f…
Browse files Browse the repository at this point in the history
…or the login button.
  • Loading branch information
Jill Vogel committed Jan 20, 2016
1 parent 8b07008 commit 36c6d2f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 2 additions & 6 deletions django_adelaidex/util/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,13 +274,9 @@ def _doLogin(self, next_path = '', user='default', login='login'):

self.selenium.find_element_by_id('id_username').send_keys(self.get_username(user))
self.selenium.find_element_by_id('id_password').send_keys(self.get_password(user))

buttons = self.selenium.find_elements_by_tag_name('button')
buttons = self.selenium.find_elements_by_css_selector('#login')
if not len(buttons):
inputs = self.selenium.find_elements_by_tag_name('input')
for i in inputs:
if i.get_attribute('type') == 'submit':
buttons.append(i)
buttons = self.selenium.find_elements_by_css_selector('input[type=submit]')
buttons[0].click()


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-adelaidex-util',
version='0.4.1',
version='0.4.2',
packages=['django_adelaidex', 'django_adelaidex.util'],
include_package_data=True,
license='Copyright The University of Adelaide, All rights reserved',
Expand Down

0 comments on commit 36c6d2f

Please sign in to comment.