Skip to content

Commit

Permalink
Fix login validation
Browse files Browse the repository at this point in the history
  • Loading branch information
silsha authored Jun 16, 2017
1 parent 2b697fa commit e1cefe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fairr.lua
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ function InitializeSession (protocol, bankCode, username, username2, password, u
local response = HTML(connection:get(url))
response:xpath("//*[@id='zugangsNummer']"):attr("value", username)
response:xpath("//*[@id='kennwort']"):attr("value", password)
connection:request(response:xpath("//*[@id='loginForm']/button"):click())
local loginresponse = HTML(connection:request(response:xpath("//*[@id='loginForm']/button"):click()))

if string.match(connection:getBaseURL(), 'kunde.html') then
if (loginresponse:xpath("//*[@class='error_msg']/p"):text() == "Ihre Anmeldung konnte nicht bestätigt werden.") then
return LoginFailed
end
end
Expand Down

0 comments on commit e1cefe1

Please sign in to comment.