File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Aquality.Selenium/tests/Aquality.Selenium.Tests/Integration/TestApp/ManyTools/Forms Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,12 @@ namespace Aquality.Selenium.Tests.Integration.TestApp.ManyTools.Forms
1010{
1111 internal abstract class ManyToolsForm < T > : Form where T : ManyToolsForm < T >
1212 {
13- private const string BaseUrl = "https://manytools.org/" ;
13+ private const string BaseUrl = "https://manytools.org/" ;
1414
1515 protected ManyToolsForm ( By locator , string name ) : base ( locator , name )
1616 {
1717 }
18+ private IButton AgreeButton => ElementFactory . GetButton ( By . XPath ( "//button[@mode='primary']" ) , "Agree" ) ;
1819 private ILabel ValueLabel => FormElement . FindChildElement < ILabel > ( By . XPath ( ".//code" ) , Name ) ;
1920
2021 protected abstract string UrlPart { get ; }
@@ -29,6 +30,12 @@ public T Open()
2930 {
3031 AqualityServices . Browser . GoTo ( Url ) ;
3132 AqualityServices . Browser . WaitForPageToLoad ( ) ;
33+ State . WaitForDisplayed ( ) ;
34+ if ( AgreeButton . State . IsDisplayed )
35+ {
36+ AgreeButton . Click ( ) ;
37+ AgreeButton . State . WaitForNotDisplayed ( ) ;
38+ }
3239 } , new List < Type > { typeof ( WebDriverTimeoutException ) } ) ;
3340
3441 return ( T ) this ;
You can’t perform that action at this time.
0 commit comments