0

First I use python and selenium to load a website in firefox. Then I fill in a simple javascript type form. The site is poorly made but usually if I tell selenium to use (Keys.RETURN) then it will drop down a list of options. The problem is I don't know how to click on one of these because they didn't load with the web page. I tried using (Keys.ARROW_DOWN) to go through them but it still doesn't really work.

How can I interact with javascript through selenium using python?

Thanks.

P.S. I know almost nothing about javascript so if there is some way to do it, I still would be clueless on how to use javascript anyway...

4

1 回答 1

0

您可能必须告诉浏览器等待几毫秒。

一些要看的地方:

使用 Selenium 在 Firefox 上单击 Javascript 链接

http://seleniumhq.org/docs/04_webdriver_advanced.jsp

于 2013-02-02T16:08:02.660 回答