How To Click A Button In Javascript With Swift
Hey I'm trying to figure out how to click this simple little button but I'm failing. This is the correct code implementation but wrong path in javascript. I need to click on the a
Solution 1:
In order to trigger the function, you need to click on the <a>
tag (the HTML tag that listens for clicks), but the id
you're looking up is on the <table>
tag. Note that the key change here is a different selector/selection method, but try this:
self.webView.evaluateJavaScript("document.querySelector('#participant-page-results-more a').click();"){ (value, error) in
if let err = error {
print(err)
}
}
Post a Comment for "How To Click A Button In Javascript With Swift"