mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-17 21:04:11 +00:00
47cfaf62bd
Did some clean-up for Cucumber tags and code conventions. Change-Id: Ifc954f60a50c41211043493fd64c2dcfa64848ff Mingle: Multimedia card #100 Bug: 60049
23 lines
536 B
Ruby
23 lines
536 B
Ruby
class LoginPage
|
|
include PageObject
|
|
|
|
include URL
|
|
page_url URL.url("Special:UserLogin")
|
|
|
|
button(:login, id: "wpLoginAttempt")
|
|
text_field(:password, id: "wpPassword1")
|
|
text_field(:username, id: "wpName1")
|
|
|
|
def logged_in_as_element
|
|
@browser.div(id: "mw-content-text").p.b
|
|
end
|
|
def login_with(username, password)
|
|
self.username_element.when_present.send_keys(username)
|
|
self.password_element.when_present.send_keys(password)
|
|
login_element.fire_event("onfocus")
|
|
login_element.when_present.click
|
|
end
|
|
end
|
|
|
|
|