Skip to content

Commit

Permalink
getDriver for Buttons too
Browse files Browse the repository at this point in the history
  • Loading branch information
seejaybee committed Jun 13, 2024
1 parent 96c822c commit 3fb5789
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.baloise.testautomation.taf.browser.elements;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;

import com.baloise.testautomation.taf.base._base.AButton;
import com.baloise.testautomation.taf.base._base.TafError;
import com.baloise.testautomation.taf.common.interfaces.IFinder;

public class BrButton extends AButton {

Expand All @@ -17,4 +19,12 @@ public WebElement find() {
return (WebElement) brFind();
}

public WebDriver getDriver() {
IFinder<?> finder = getFinder();
if (finder instanceof BrFinder) {
return ((BrFinder)finder).getDriver();
}
return null;
}

}

0 comments on commit 3fb5789

Please sign in to comment.