python executescript_Selenium Webdriver 中的 executeScript 使用方法

//

// Summary:

// Executes JavaScript in the context of the currently selected frame or window.

//

// Parameters:

// script:

// The JavaScript code to execute.

//

// args:

// The arguments to the script.

//

// Returns:

// The value returned by the script.

//

// Remarks:

// The OpenQA.Selenium.IJavaScriptExecutor.ExecuteScript(System.String,System.Object[])method

// executes JavaScript in the context of the currently selected frame or window.

// This means that "document" will refer to the current document. If the script

// has a return value, then the following steps will be taken:

// For an HTML element, this method returns a OpenQA.Selenium.IWebElement For a

// number, a System.Int64 is returned For a boolean, a System.Boolean is returned

// For all other cases a System.String is returned. For an array,we check the first

// element, and attempt to return a System.Collections.Generic.List`1 of that type,

// following the rules above. Nested lists are not supported. If the value is null

// or there is no return value, null is returned.

// Arguments must be a number (which will be converted to a System.Int64), a System.Boolean,

// a System.String or a OpenQA.Selenium.IWebElement. An exception will be thrown

// if the arguments do not meet these criteria. The arguments will be made available

// to the JavaScript via the "arguments" magic variable, as if the function were

// called via "Function.apply"

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值