Reputation: 84
I've been wondering whether or not this is possible -
Here is a picture of Chrome's "inspect element" on this website.
Is it possible for me to run the "goCourseDetails" js function with my own parameters?
I'm using Python and selenium to try and write a script that does that for me, but I don't know how to access the JS function.
Thanks in advance.
Upvotes: 1
Views: 532
Reputation: 13712
You can use driver.execute_script()
to execute javascript snippet in browser.
The function goCourseDetails
can be obtain from browser global variable window
driver.execute_script('window.goCourseDetails.call(null, arguments)',
<department>, <degreelevel>, <course>, <detail>, <year>, <semester>
)
Upvotes: 1