How I can access elements of web page, get rid of loading jQuery

Viewed 27

Im parsing site in my mobile application, my current code accessing needed elements is:

var string = try! String(contentsOf: Bundle.main.url(forResource: "jquery-3.6.1", withExtension: "min")!)           
    string += "var input = window.jQuery('.form-group:visible:not(.blocked, .ddt, .form-element, .inlined, .isOnshow, .r-f, .robo-cop, .salad-box, .shown, .tyu-33, .visually-hidden, .visuallyhidden) input[type=text]');\n"
    string += "var button = window.jQuery('.form-group:visible:not(.blocked, .ddt, .form-element, .inlined, .isOnshow, .r-f, .robo-cop, .salad-box, .shown, .tyu-33, .visually-hidden, .visuallyhidden) input[type=submit]');\n"
    string += "input.val('YE19OMG');\n"
    string += "button.click();"

Can I get rid of using jQuery and accessing these elements by usual JS syntax?

0 Answers
Related