Selenium
FindByアノテーションを使うことで、こんな長いコードが public void setUserName(String username) { driver.findElement(By.id("MainContent_txtUserName")).sendKeys(username); } public void setPassword(String password) { driver.findElement(By.id(…
例えば、こういうふうに複数のウィンドウがあるとしたら、 操作のためにポインターを移動させる必要がある。 こういう場合は、現在開いているウィンドウ情報を持ってきて(リスト)、 その中でポインターをSwitchさせたらオッケー Code // Switch the window…
ロードに時間がかかる時とかの解決策ってことかな。 //driver.findElement(By.xpath("//*[@id=\"40553\"]/div[2]/div/a")).click(); driver.findElement(By.xpath("//*[@id=\"resultsContainer\"]/section/article[" + searchResult + "]/div[2]/div/a")).cl…
問題 要素がnot visibleになっていて、クリック動作が動かなかった→テスト失敗 どこが問題なのか CSS選択ができない XPathも使えない 原因 単に当たる要素が見える化されてないから。 解決策 クリックをする前に、コードレベルでJSとして値をVisibleに変換す…
タスク解決のために、webdriverの勉強をし始めます。 Automation Testing Building a test framework Manage regression testing and functional testing Continuous integration / development Behavior-Driven Development with Cucumber Selenium Suite T…