[英]Apart from click() and submit() method is there any other way to select/click a web element in selenium Webdriver?
在Java中
WebElement button = driver.findElement(By.id(""));
//For clicking the button...
button.click();
有沒有其他方法可以點擊webElement,如收音機盒,復選框,按鈕等..?
如果你想點擊什么,你為什么要用別的東西? 我猜click()是元素可點擊的最佳方法。
仍然可以使用enter來執行相同的操作。
WebElement button = driver.findElement(By.id(""));
button.sendKeys(Keys.Enter);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.