Selenium how to select an object by class

后端 未结 4 1926
夕颜
夕颜 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:22

    in response to "Can I do a jQuery type of selector," jQuery uses CSS selectors. Selenium can also use CSS selectors; just prefix the selector with "css=". so:

    css=.ul.ui-autocomplete li:first a
    

提交回复
热议问题