mkoehnke / WKZombie

WKZombie is a Swift framework for iOS/OSX to navigate within websites and collect data without the need of User Interface or API, also known as Headless browser. It can be used to run automated tests / snapshots and manipulate websites using Javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

question - trying to fill in an angular form

avisual opened this issue · comments

open(url)
>>> get(by: .id("loginPassword"))
>>> setAttribute("value", value: "password")
>>> execute("angular.element($('#loginPassword')).triggerHandler('input')")
>>> inspect
>>> get(by: .id("formLogin"))
>>> submit

but the js is not triggering the handler as password is rejected. this works in console in chrome

pointers please

solved problem

open(url)

execute("loginPassword.value='password'")
execute("angular.element($('#loginPassword')).triggerHandler('input')")
execute("angular.element($('#submitButton')).triggerHandler('click')")
inspect