Many tests follow "I am logged in" with "visit FlowPage", "I navigate to Upload Wizard", "I visit the User page of Selenium_user2", etc. In these cases Special:UserLogin's default behavior of loading the Main_Page upon successful login is a waste of precious time.
MediaWiki has already solved this for human beings. Clients can pass ?returnto=Some_wiki_page to Special:UserLogin so that upon successful login the user is redirected to Some_wiki_page. It's what the _Log in_ link on every wiki page does, as you can see if you hover over it and note its URL.
We could expose this as
Given I am logged in to <PAGE>
in tests. mediawiki_selenium/step_definitions/login_steps.rb would need to recognize the presence of this optional parameter and append ?returnto=URLEncode(pageName) to LoginPage
I would prototype this but I don't know where the visit() function is defined or documented in our webdriver-selenium-watir-cheezy-cucumber stack.