0

i want select li dropdown to click enter image description here

driver.find_element((By.XPATH, "//li[@class='ellipsis1']")).click()

error :

selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: 'using' must be a string

and i change the code to

driver.find_element(By.XPATH, "//li[@class='ellipsis1']").click()

error :

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//li[@class='ellipsis1']"}

What should I do?

Vova
  • 3,117
  • 2
  • 15
  • 23
Puleugo
  • 1
  • 1
  • 1
    Does this answer your question? [Find div element by multiple class names?](https://stackoverflow.com/questions/21713280/find-div-element-by-multiple-class-names) – SiKing Apr 01 '21 at 17:47

1 Answers1

0

Try to use that one:

driver.find_element(By.XPATH, "//li[@class='ellipsis1 selectbox-item(1)']").click()

or

driver.find_element(By.XPATH, "//li[contains(@class,'ellipsis1')][1]").click()
Vova
  • 3,117
  • 2
  • 15
  • 23