File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 1
1
using Appium . Net . Integration . Tests . helpers ;
2
2
using NUnit . Framework ;
3
3
using OpenQA . Selenium . Appium . Android ;
4
+ using OpenQA . Selenium . Support . UI ;
5
+ using System ;
4
6
5
7
namespace Appium . Net . Integration . Tests . Android
6
8
{
7
9
[ TestFixture ]
8
10
public class CurrentPackageTest
9
11
{
10
12
private AndroidDriver _driver ;
13
+ private WebDriverWait _waitDriver ;
14
+ private readonly TimeSpan _driverTimeOut = TimeSpan . FromSeconds ( 5 ) ;
15
+
11
16
private const string DemoAppPackage = "io.appium.android.apis" ;
12
17
13
18
[ OneTimeSetUp ]
@@ -37,6 +42,8 @@ public void TearDowwn()
37
42
[ Test ]
38
43
public void ReturnsCorrectNameForCurrentApp ( )
39
44
{
45
+ _waitDriver = new WebDriverWait ( _driver , _driverTimeOut ) ;
46
+ _waitDriver . Until ( driver => _driver . CurrentPackage == DemoAppPackage ) ;
40
47
Assert . That ( _driver . CurrentPackage , Is . EqualTo ( DemoAppPackage ) ) ;
41
48
}
42
49
}
You can’t perform that action at this time.
0 commit comments