Selenium+firefox: empty execute_script arguments

前端 未结 2 442
星月不相逢
星月不相逢 2021-01-06 04:49

I\'m trying to set textarea value using javascript instead send_keys() method.

As documentation says, I should be able to pass webelement to execute_scr

2条回答
  •  北海茫月
    2021-01-06 05:37

    Selenium can no longer execute javascript with passed parameters in Firefox, as of version 35. Selenium has been able to pass in arguments via a kind of backdoor known as __exposedProps__. As part of an overall tightening up of the external bindings interface (and some busywork, financed by all of that money they made from Google), they deprecated, and then removed, this interface. Their intention was documented in a deprecation notice in mid-2014. Selenium bug #8390 covers it, but I take it this caught the dev team by surprise and I don't see any activity to migrate to another interface yet, which I presume will be WebIDL.

    It doesn't affect other browsers, but Firefox is by far the quickest and easiest method of testing with Selenium. Currently, the best option for us web testers is to just downgrade to Firefox 34 and turn off automatic updates until a resolution is available.

提交回复
热议问题