enter image description here selenium webdriverを使用してインライン要素をクリックすることはできません。ここでselenium webdriverを使用してインライン要素をクリックできません
は、正方形のアイコンがあるイメージリンク(右側上部)のほかにURL https://www.google.com/.
です。そのアイコンをクリックしてMapsを選択する必要があります。 スクリーンショットが添付されています。 xpath、cssselector、ID、Nameを使用しましたが、何も動作していません。 誰も私にこれを手伝ってもらえますか?
コード:
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.Select;
public class webelements2 {
public static void main(String[] args) throws InterruptedException
{
System.setProperty("webdriver.gecko.driver","C:\\Users\\rpremala003\\Downloads\\geckodriver-v0.14.0-win64\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("https://www.google.com/");
driver.manage().window().maximize();
driver.findElement(By.id("gbwa")).click();
driver.findElement(By.className("gb_3")).click();
}
}
こんにちはアニッシュ、返信いただきありがとうございます。もう一度ページが商品ページに移動します。マップアイコンをクリックしていません。 –