画像間の特定の場所をクリックする必要があるシナリオがあります。Firebug を使用して分析すると、画像として表示され、ID が「Panel_」として指定されます
Actions builder = new Actions(driver);
// taking mouse to 00
builder.moveByOffset(0,0).build().perform();
// then clicking on the x y cords of the image. This XY i have taken from one tool.
builder.moveByOffset(1076,560).click().build().perform();
または
WebElement target = driver.findElement(By.id("Panel_"));
Actions builder = new Actions(driver);
int clickAtX = 1076;
int clickAtY = 560;
builder.moveToElement(target,clickAtX,clickAtY).click().build().perform();
しかし、どちらのコード フラグメントも役に立ちません。ページ範囲外をクリックすると表示されることがあります。「Mofiki's Coordinate Finder」ツールを使用して xy 座標を取得しました。
これを行う他の方法はありますか?