Selenium how to select an object by class

后端 未结 4 1860
夕颜
夕颜 2021-02-07 04:28

I have a web page with a form and has a field that uses the jquery autocomplete function.

\"enter

4条回答
  •  醉梦人生
    2021-02-07 05:01

    Use XPath selector in Selenium:

    xpath=//li[contains(@class, 'ui-autocomplete')]/li[1]/a
    

    not checked, might require some corrections.

提交回复
热议问题