XPath or CSS in Selenium RC with Java is not working

前端 未结 3 1962
Happy的楠姐
Happy的楠姐 2021-01-16 05:01

I am trying to automate the following scenario with selenium RC:

  1. Open Google home page and enter \"Software\" in search box and then click on search button.
3条回答
  •  旧巷少年郎
    2021-01-16 05:48

    Just a side note, Google has a ban on automated queries. I was using Google to test when I was new to testing, now I use our own server.

    What you are looking for is this:

    //a[contains(text(), 'software')] 
    

    This selects the first link with "software" in the link text.

提交回复
热议问题