0
<input _ngcontent-ng-cli-universal-c28="" type="text" name="cardNumber" id="cardNumber-input" autocomplete="cc-number" required="" maxlength="23" ccnumber="" class="form-control ng-pristine ng-invalid ng-touched">

if I want to send text in label What should i find_element_by_?

enter image description here

payoung
  • 1
  • 1
  • What label? You're showing us an input element with an ID='cardNumber-input'. If you want to interact with said input element then I'd recommend `find_element_by_id`. –  Feb 08 '21 at 15:33
  • @JustinEzequiel it's error : raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="cardNumber-input"]"} – payoung Feb 08 '21 at 15:45
  • Then you're not getting the HTML you expected. Perhaps the content is loaded via javascript. Post how you are getting the HTML and, if you can, the URL. –  Feb 08 '21 at 16:27
  • @JustinEzequiel What do i need to do – payoung Feb 08 '21 at 16:45
  • Post how you are getting the HTML and, if you can, the URL. –  Feb 08 '21 at 16:48
  • Post your code. –  Feb 08 '21 at 17:03
  • I use driver = webdriver.Chrome(driverpath) driver.get(url) – payoung Feb 08 '21 at 17:10
  • Without more of your code and the URL then I do not see how we can help you. Perhaps the element is in an iframe, perhaps it has not had time to load yet. We cannot tell, can we? –  Feb 08 '21 at 17:30
  • @JustinEzequiel html : https://drive.google.com/file/d/1XhA4A8JRdNYwmO1-qZr9iB3iF456Cez9/view?usp=sharing – payoung Feb 08 '21 at 17:43
  • That HTML does not even contain the ID in your question. What URL are you passing to `driver.get(...)`? –  Feb 08 '21 at 17:53

0 Answers0