ExpectedCondition を実装するさまざまなクラスがあります。そのうちの 1 つである AttributeContainsCondition を以下に示します。私のテストでは、条件ドットのようなものを使用して、ExpectedCondition から利用可能なすべてのメソッドと、ExpectedCondition を実装する作成したすべてのクラスを確認しようとしています。
したがって、私のテストでは、ExpectedCondition からすべてのメソッドと、ExpectedCondition を実装する作成したすべてのクラスを取得するために何かを追加しようとしています。クラスを作成した場所をインポートしています。
public class AttributeContainsCondition implements ExpectedCondition<Boolean>{
private final WebElement element;
private final String attributeName, expectedValue;
public AttributeContainsCondition(WebElement element, String attributeName, String expectedValue){
this.element = element;
this.attributeName = attributeName;
this.expectedValue = expectedValue;
}
public Boolean apply(WebDriver input){
return StringUtils.contains(element.getAttribute(attributeName), expectedValue);
}
}
テストファイル: これは機能していません
import org.openqa.selenium.support.ui.ExpectedConditions;
public class VerifyInfoTest extends mainTest {
ExpectedConditions condition = new ExpectedConditions<boolean>(); ????
したがって、condition.xxxx を使用すると、ExpectedConditions のメソッドと、それを実装するために作成したすべてのクラスが表示されます。
ありがとうございました :)