硒中的父子关系是否也适用于cssSelector例-此X路径有效:
driver.findElement(By.xpath("//div[@class='gb_ke gb_i gb_Kg gb_Ag']/div[2]/a")).click();
但是此cssSelector不是:
driver.findElement(By.cssSelector("div[class*='gb_ke gb_i gb_Kg gb_Ag']/div[2]/a")).click();
它给出错误:
An invalid or illegal selector was specified
<< / a“))。click();但是...