I\'ve written a script in vba in association with selenium to initiate a search in some torrent site. My script is doing fine but the problem is I had to use hardcoded del
Seems to have found the solution already. There is the link leading to github where Florent B.
has provided an excellent solution as to how the script should wait until the desired element is available.
This is how the script should be:
Sub SearchItem()
With New ChromeDriver
.get "https://torrentz2.eu/"
.FindElementByCss("#thesearchbox", timeout:=10000).SendKeys "Udemy" ''wait for the element upto 10 seconds
.FindElementByCss("#thesearchbutton").Click
End With
End Sub