问题描述
我想通过硒(do-while)在一个特定的网站上订购几次,但是单击订购按钮后,该网站不能清除文本的值。我想在C#.Net中按硒单击按钮后清除文本值,以便重复执行命令。我的代码是:
{
"name" : "javafx.scene.layout.GridPane","allDeclaredConstructors" : true,"allPublicConstructors" : true,"allDeclaredFields" : true,"allPublicFields" : true,"allDeclaredMethods" : true,"allPublicMethods" : true
}
解决方法
尝试下面的代码-应该可以。
BuyActions.MoveToElement(cDriver.FindElementByCssSelector("#send_order_txtPrice"));
BuyActions.Clear();
BuyActions.Click();
BuyActions.SendKeys(BuyPrice);