Code cleanup
This commit is contained in:
@@ -5,11 +5,16 @@ namespace AOW4.SeleniumTests.Pages;
|
||||
public class HomePage
|
||||
{
|
||||
private readonly IWebDriver _driver;
|
||||
public HomePage(IWebDriver driver) => _driver = driver;
|
||||
|
||||
public HomePage(IWebDriver driver)
|
||||
{
|
||||
_driver = driver;
|
||||
}
|
||||
|
||||
public bool IsAt()
|
||||
{
|
||||
var url = _driver.Url ?? string.Empty;
|
||||
return url.EndsWith("/") || url.Contains("/index", System.StringComparison.OrdinalIgnoreCase) || _driver.PageSource.Contains("Home");
|
||||
return url.EndsWith("/") || url.Contains("/index", StringComparison.OrdinalIgnoreCase) ||
|
||||
_driver.PageSource.Contains("Home");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user