2

I have this part of HTML:

<input id="naklName" type="text" placeholder="input number document" class="form-control" align="left">

and I can't input value in TextBox with Selenium VBA. May be it works without Selenium.

I tried first XPATH:

bot.FindElementByXpath("//*[@id='naklName']").SendKeys "123"

and other combinations with CLASS, Css, ID. But always NotFoundElement. My VBA code like as:

 Dim bot As New WebDriver   
    bot.Start "chrome", "url"

enter image description here

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
ENOT
  • 23
  • 3

1 Answers1

1

Given the HTML:

html

To send a character sequence within the <input> you can use either of the following locator strategies:

  • Using FindElementByCss:

    bot.FindElementByCss("label[for='naklName']").SendKeys "ENOT"
    
  • Using FindElementByXPath:

    bot.FindElementByXPath("//label[@for='naklName']").SendKeys "ENOT"
    
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352