I have element in my code that looks like this:
<input id="invoice_supplier_id" name="invoice[supplier_id]" type="hidden" value="">
I want to set its value, so I created a web element with it's xpath:
val test = driver.findElements(By.xpath("""//*[@id="invoice_supplier_id"]"""))
but now I dont see an option to set the value...
Use
findElement
instead offindElements
OR
OR
Hope it will help you :)
As Shubham Jain stated, this is working to me:
driver.findElement(By.id("invoice_supplier_id")).sendKeys("value", "new value");