How to call Python function in JavaScript environment on Selenium?

25 views Asked by At

Is there a way to call a Python function from a web page?

Or is there a way inject Python methods to selenium, it can used by JavaScript call.

I was not able to get some message from AJAX request result, if JS can call a Python method.

def test():
   pass
options = Options()
browser = webdriver.Chrome(options)
// Is there a way call Python test method?
window.test() // ??
0

There are 0 answers