我在页面中有一个用户控件UserInfo
。用户控件中有一个名称为cbType
的组合框。如果我使用硒,如何访问此组合框进行测试?
下面是我的代码:
[TestMethod]
public void Test_GoToAddDepositPage()
{
IWebElement el = driver.FindElement(By.Id("ctl00_MainContent_ucDepositMasterInput_rcbAccountNo_Input"));
el.InsertKeys("Big"")
}
我的猜测是您要使用硒暴露的SendKeys
功能
有两种口味
这可能是您需要的:
public Actions SendKeys(
IWebElement element,
string keysToSend
)
这将直接发送到浏览器:
public Actions SendKeys(
string keysToSend
)