Ifd_Mobile 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Ifd_Mobile/lib_steps.rb +145 -140
- data/lib/Ifd_Mobile/methods/IFD_Assertion.rb +44 -44
- data/lib/Ifd_Mobile/methods/core.rb +256 -256
- data/lib/Ifd_Mobile/methods/lib_var.rb +53 -53
- data/lib/Ifd_Mobile/version.rb +5 -5
- data/project/Gemfile +9 -9
- data/project/Gemfile.lock +50 -137
- data/project/apps/Bedder_2.0_0.17_VN.apk +0 -0
- data/project/apps/TestApp/Test App 2/GestureTestViewController.h +18 -18
- data/project/apps/TestApp/Test App 2/GestureTestViewController.m +48 -48
- data/project/apps/TestApp/Test App 2/GestureTestViewController.xib +46 -46
- data/project/apps/TestApp/Test App 2/MyViewControllerViewController.h +42 -42
- data/project/apps/TestApp/Test App 2/MyViewControllerViewController.m +193 -193
- data/project/apps/TestApp/Test App 2/TA2AppDelegate.h +28 -28
- data/project/apps/TestApp/Test App 2/TA2AppDelegate.m +85 -85
- data/project/apps/TestApp/Test App 2/TestApp-Info.plist +40 -40
- data/project/apps/TestApp/Test App 2/TestApp-Prefix.pch +29 -29
- data/project/apps/TestApp/Test App 2/en.lproj/InfoPlist.strings +21 -21
- data/project/apps/TestApp/Test App 2/en.lproj/MyViewControllerViewController.xib +175 -175
- data/project/apps/TestApp/Test App 2/main.m +31 -31
- data/project/apps/TestApp/TestApp.xcodeproj/project.pbxproj +336 -336
- data/project/apps/TestApp/TestApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -7
- data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/TestApp.xcscheme +88 -88
- data/project/apps/TestApp/TestApp.xcodeproj/xcuserdata/anhpham.xcuserdatad/xcschemes/xcschememanagement.plist +22 -22
- data/project/apps/polyclaim.apk +0 -0
- data/project/features/android/Android_test1.feature +16 -14
- data/project/features/android/Android_test2.feature +14 -14
- data/project/features/iOS/iOS_test.feature +15 -15
- data/project/features/step_definitions/lib_steps/PolyClaim_homepage.rb +12 -2
- data/project/features/step_definitions/lib_steps/PolyClaim_loginpage.rb +3 -3
- data/project/features/step_definitions/repositories/android_ob_test.rb +9 -9
- data/project/features/step_definitions/repositories/ios_ob_test.rb +6 -6
- data/project/features/support/env.rb +36 -36
- data/project/features/support/hooks.rb +8 -8
- data/project/features/support/project_env.rb +42 -42
- metadata +41 -45
@@ -1,7 +1,7 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<Workspace
|
3
|
-
version = "1.0">
|
4
|
-
<FileRef
|
5
|
-
location = "self:TestApp.xcodeproj">
|
6
|
-
</FileRef>
|
7
|
-
</Workspace>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Workspace
|
3
|
+
version = "1.0">
|
4
|
+
<FileRef
|
5
|
+
location = "self:TestApp.xcodeproj">
|
6
|
+
</FileRef>
|
7
|
+
</Workspace>
|
@@ -1,88 +1,88 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<Scheme
|
3
|
-
LastUpgradeVersion = "0630"
|
4
|
-
version = "1.3">
|
5
|
-
<BuildAction
|
6
|
-
parallelizeBuildables = "YES"
|
7
|
-
buildImplicitDependencies = "YES">
|
8
|
-
<BuildActionEntries>
|
9
|
-
<BuildActionEntry
|
10
|
-
buildForTesting = "YES"
|
11
|
-
buildForRunning = "YES"
|
12
|
-
buildForProfiling = "YES"
|
13
|
-
buildForArchiving = "YES"
|
14
|
-
buildForAnalyzing = "YES">
|
15
|
-
<BuildableReference
|
16
|
-
BuildableIdentifier = "primary"
|
17
|
-
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
18
|
-
BuildableName = "TestApp.app"
|
19
|
-
BlueprintName = "TestApp"
|
20
|
-
ReferencedContainer = "container:TestApp.xcodeproj">
|
21
|
-
</BuildableReference>
|
22
|
-
</BuildActionEntry>
|
23
|
-
</BuildActionEntries>
|
24
|
-
</BuildAction>
|
25
|
-
<TestAction
|
26
|
-
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
27
|
-
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
28
|
-
shouldUseLaunchSchemeArgsEnv = "YES"
|
29
|
-
buildConfiguration = "Debug">
|
30
|
-
<Testables>
|
31
|
-
</Testables>
|
32
|
-
<MacroExpansion>
|
33
|
-
<BuildableReference
|
34
|
-
BuildableIdentifier = "primary"
|
35
|
-
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
36
|
-
BuildableName = "TestApp.app"
|
37
|
-
BlueprintName = "TestApp"
|
38
|
-
ReferencedContainer = "container:TestApp.xcodeproj">
|
39
|
-
</BuildableReference>
|
40
|
-
</MacroExpansion>
|
41
|
-
</TestAction>
|
42
|
-
<LaunchAction
|
43
|
-
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
44
|
-
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
45
|
-
launchStyle = "0"
|
46
|
-
useCustomWorkingDirectory = "NO"
|
47
|
-
buildConfiguration = "Debug"
|
48
|
-
ignoresPersistentStateOnLaunch = "NO"
|
49
|
-
debugDocumentVersioning = "YES"
|
50
|
-
allowLocationSimulation = "YES">
|
51
|
-
<BuildableProductRunnable
|
52
|
-
runnableDebuggingMode = "0">
|
53
|
-
<BuildableReference
|
54
|
-
BuildableIdentifier = "primary"
|
55
|
-
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
56
|
-
BuildableName = "TestApp.app"
|
57
|
-
BlueprintName = "TestApp"
|
58
|
-
ReferencedContainer = "container:TestApp.xcodeproj">
|
59
|
-
</BuildableReference>
|
60
|
-
</BuildableProductRunnable>
|
61
|
-
<AdditionalOptions>
|
62
|
-
</AdditionalOptions>
|
63
|
-
</LaunchAction>
|
64
|
-
<ProfileAction
|
65
|
-
shouldUseLaunchSchemeArgsEnv = "YES"
|
66
|
-
savedToolIdentifier = ""
|
67
|
-
useCustomWorkingDirectory = "NO"
|
68
|
-
buildConfiguration = "Release"
|
69
|
-
debugDocumentVersioning = "YES">
|
70
|
-
<BuildableProductRunnable
|
71
|
-
runnableDebuggingMode = "0">
|
72
|
-
<BuildableReference
|
73
|
-
BuildableIdentifier = "primary"
|
74
|
-
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
75
|
-
BuildableName = "TestApp.app"
|
76
|
-
BlueprintName = "TestApp"
|
77
|
-
ReferencedContainer = "container:TestApp.xcodeproj">
|
78
|
-
</BuildableReference>
|
79
|
-
</BuildableProductRunnable>
|
80
|
-
</ProfileAction>
|
81
|
-
<AnalyzeAction
|
82
|
-
buildConfiguration = "Debug">
|
83
|
-
</AnalyzeAction>
|
84
|
-
<ArchiveAction
|
85
|
-
buildConfiguration = "Release"
|
86
|
-
revealArchiveInOrganizer = "YES">
|
87
|
-
</ArchiveAction>
|
88
|
-
</Scheme>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<Scheme
|
3
|
+
LastUpgradeVersion = "0630"
|
4
|
+
version = "1.3">
|
5
|
+
<BuildAction
|
6
|
+
parallelizeBuildables = "YES"
|
7
|
+
buildImplicitDependencies = "YES">
|
8
|
+
<BuildActionEntries>
|
9
|
+
<BuildActionEntry
|
10
|
+
buildForTesting = "YES"
|
11
|
+
buildForRunning = "YES"
|
12
|
+
buildForProfiling = "YES"
|
13
|
+
buildForArchiving = "YES"
|
14
|
+
buildForAnalyzing = "YES">
|
15
|
+
<BuildableReference
|
16
|
+
BuildableIdentifier = "primary"
|
17
|
+
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
18
|
+
BuildableName = "TestApp.app"
|
19
|
+
BlueprintName = "TestApp"
|
20
|
+
ReferencedContainer = "container:TestApp.xcodeproj">
|
21
|
+
</BuildableReference>
|
22
|
+
</BuildActionEntry>
|
23
|
+
</BuildActionEntries>
|
24
|
+
</BuildAction>
|
25
|
+
<TestAction
|
26
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
27
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
28
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
29
|
+
buildConfiguration = "Debug">
|
30
|
+
<Testables>
|
31
|
+
</Testables>
|
32
|
+
<MacroExpansion>
|
33
|
+
<BuildableReference
|
34
|
+
BuildableIdentifier = "primary"
|
35
|
+
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
36
|
+
BuildableName = "TestApp.app"
|
37
|
+
BlueprintName = "TestApp"
|
38
|
+
ReferencedContainer = "container:TestApp.xcodeproj">
|
39
|
+
</BuildableReference>
|
40
|
+
</MacroExpansion>
|
41
|
+
</TestAction>
|
42
|
+
<LaunchAction
|
43
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
44
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
45
|
+
launchStyle = "0"
|
46
|
+
useCustomWorkingDirectory = "NO"
|
47
|
+
buildConfiguration = "Debug"
|
48
|
+
ignoresPersistentStateOnLaunch = "NO"
|
49
|
+
debugDocumentVersioning = "YES"
|
50
|
+
allowLocationSimulation = "YES">
|
51
|
+
<BuildableProductRunnable
|
52
|
+
runnableDebuggingMode = "0">
|
53
|
+
<BuildableReference
|
54
|
+
BuildableIdentifier = "primary"
|
55
|
+
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
56
|
+
BuildableName = "TestApp.app"
|
57
|
+
BlueprintName = "TestApp"
|
58
|
+
ReferencedContainer = "container:TestApp.xcodeproj">
|
59
|
+
</BuildableReference>
|
60
|
+
</BuildableProductRunnable>
|
61
|
+
<AdditionalOptions>
|
62
|
+
</AdditionalOptions>
|
63
|
+
</LaunchAction>
|
64
|
+
<ProfileAction
|
65
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
66
|
+
savedToolIdentifier = ""
|
67
|
+
useCustomWorkingDirectory = "NO"
|
68
|
+
buildConfiguration = "Release"
|
69
|
+
debugDocumentVersioning = "YES">
|
70
|
+
<BuildableProductRunnable
|
71
|
+
runnableDebuggingMode = "0">
|
72
|
+
<BuildableReference
|
73
|
+
BuildableIdentifier = "primary"
|
74
|
+
BlueprintIdentifier = "3647AE0D15CA0082006F70D6"
|
75
|
+
BuildableName = "TestApp.app"
|
76
|
+
BlueprintName = "TestApp"
|
77
|
+
ReferencedContainer = "container:TestApp.xcodeproj">
|
78
|
+
</BuildableReference>
|
79
|
+
</BuildableProductRunnable>
|
80
|
+
</ProfileAction>
|
81
|
+
<AnalyzeAction
|
82
|
+
buildConfiguration = "Debug">
|
83
|
+
</AnalyzeAction>
|
84
|
+
<ArchiveAction
|
85
|
+
buildConfiguration = "Release"
|
86
|
+
revealArchiveInOrganizer = "YES">
|
87
|
+
</ArchiveAction>
|
88
|
+
</Scheme>
|
@@ -1,22 +1,22 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
-
<plist version="1.0">
|
4
|
-
<dict>
|
5
|
-
<key>SchemeUserState</key>
|
6
|
-
<dict>
|
7
|
-
<key>TestApp.xcscheme</key>
|
8
|
-
<dict>
|
9
|
-
<key>orderHint</key>
|
10
|
-
<integer>0</integer>
|
11
|
-
</dict>
|
12
|
-
</dict>
|
13
|
-
<key>SuppressBuildableAutocreation</key>
|
14
|
-
<dict>
|
15
|
-
<key>3647AE0D15CA0082006F70D6</key>
|
16
|
-
<dict>
|
17
|
-
<key>primary</key>
|
18
|
-
<true/>
|
19
|
-
</dict>
|
20
|
-
</dict>
|
21
|
-
</dict>
|
22
|
-
</plist>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>SchemeUserState</key>
|
6
|
+
<dict>
|
7
|
+
<key>TestApp.xcscheme</key>
|
8
|
+
<dict>
|
9
|
+
<key>orderHint</key>
|
10
|
+
<integer>0</integer>
|
11
|
+
</dict>
|
12
|
+
</dict>
|
13
|
+
<key>SuppressBuildableAutocreation</key>
|
14
|
+
<dict>
|
15
|
+
<key>3647AE0D15CA0082006F70D6</key>
|
16
|
+
<dict>
|
17
|
+
<key>primary</key>
|
18
|
+
<true/>
|
19
|
+
</dict>
|
20
|
+
</dict>
|
21
|
+
</dict>
|
22
|
+
</plist>
|
Binary file
|
@@ -1,15 +1,17 @@
|
|
1
|
-
@android_demo1
|
2
|
-
Feature: Demo
|
3
|
-
|
4
|
-
As a Android user
|
5
|
-
I want to PolyClaim app
|
6
|
-
So that I can make the test for Demo section
|
7
|
-
|
8
|
-
Scenario: Navigate
|
9
|
-
Given I have App running with appium
|
10
|
-
When I click on Sign In button
|
11
|
-
|
12
|
-
|
13
|
-
# And I
|
14
|
-
#
|
1
|
+
@android_demo1
|
2
|
+
Feature: Demo
|
3
|
+
|
4
|
+
As a Android user
|
5
|
+
I want to PolyClaim app
|
6
|
+
So that I can make the test for Demo section
|
7
|
+
|
8
|
+
Scenario: Navigate
|
9
|
+
Given I have App running with appium
|
10
|
+
When I click on Sign In button
|
11
|
+
|
12
|
+
* I scroll the screen from startX 6 startY 8 to endX 7 endY 7 and millisecond timeout is 5
|
13
|
+
# And I input text "11122233" on "poly_DigiD"
|
14
|
+
# And I input text "12345" on "poly_Password"
|
15
|
+
And I click on Login
|
16
|
+
Then I verify property "poly_ErrorMessage" with "name" has value "Invalid credentials."
|
15
17
|
# * I test "poly_DigiD"
|
@@ -1,14 +1,14 @@
|
|
1
|
-
@android_demo2
|
2
|
-
Feature: Demo
|
3
|
-
|
4
|
-
As a Android user
|
5
|
-
I want to PolyClaim app
|
6
|
-
So that I can make the test for Demo section
|
7
|
-
|
8
|
-
Scenario: Navigate
|
9
|
-
Given I have App running with appium
|
10
|
-
When I click on Sign In button
|
11
|
-
And I input text "111222333" on "poly_DigiD"
|
12
|
-
And I input text "12345" on "poly_Password"
|
13
|
-
And I click on Login
|
14
|
-
Then I verify property "poly_Overview_header" with "name" has value "Declaration overview"
|
1
|
+
@android_demo2
|
2
|
+
Feature: Demo
|
3
|
+
|
4
|
+
As a Android user
|
5
|
+
I want to PolyClaim app
|
6
|
+
So that I can make the test for Demo section
|
7
|
+
|
8
|
+
Scenario: Navigate
|
9
|
+
Given I have App running with appium
|
10
|
+
When I click on Sign In button
|
11
|
+
And I input text "111222333" on "poly_DigiD"
|
12
|
+
And I input text "12345" on "poly_Password"
|
13
|
+
And I click on Login
|
14
|
+
Then I verify property "poly_Overview_header" with "name" has value "Declaration overview"
|
@@ -1,15 +1,15 @@
|
|
1
|
-
Feature: Demo
|
2
|
-
|
3
|
-
As a iPhone user
|
4
|
-
I want to Demo app
|
5
|
-
So that I can make the test for Demo section
|
6
|
-
@ios_demo
|
7
|
-
Scenario: Navigate
|
8
|
-
Given I have App running with appium
|
9
|
-
When I input text "4" on "textbox1"
|
10
|
-
And I input text "4" on "textbox2"
|
11
|
-
And I click on "button_sum"
|
12
|
-
Then I verify property "result" with "value" has value "8"
|
13
|
-
When I click on "show_alert"
|
14
|
-
Then I verify property "alert title" with "name" has value "Cool title"
|
15
|
-
And I accept alert
|
1
|
+
Feature: Demo
|
2
|
+
|
3
|
+
As a iPhone user
|
4
|
+
I want to Demo app
|
5
|
+
So that I can make the test for Demo section
|
6
|
+
@ios_demo
|
7
|
+
Scenario: Navigate
|
8
|
+
Given I have App running with appium
|
9
|
+
When I input text "4" on "textbox1"
|
10
|
+
And I input text "4" on "textbox2"
|
11
|
+
And I click on "button_sum"
|
12
|
+
Then I verify property "result" with "value" has value "8"
|
13
|
+
When I click on "show_alert"
|
14
|
+
Then I verify property "alert title" with "name" has value "Cool title"
|
15
|
+
And I accept alert
|
@@ -1,3 +1,13 @@
|
|
1
|
-
And /^I click on Sign In button$/ do
|
2
|
-
step %{I click on element with x: "520", y: "1150"}
|
1
|
+
And /^I click on Sign In button$/ do
|
2
|
+
step %{I click on element with x: "520", y: "1150"}
|
3
|
+
end
|
4
|
+
|
5
|
+
And /^I scroll the screen from startX (\d+) startY (\d+) to endX (\d+) endY (\d+) and millisecond timeout is (\d+)$/ do |startX, startY, endX, endY, timeout|
|
6
|
+
selenium.swipe(startX:startX, startY:startY, endX:endX,endY:endY, duration:timeout)
|
7
|
+
end
|
8
|
+
|
9
|
+
Then /^I verify property "(.*)" with "(.*)" has( | not)? value "(.*)"$/ do |object, property, negate, value|
|
10
|
+
sleep(0.5)
|
11
|
+
value = var_collect(value)
|
12
|
+
execute_checkproperty(object, property, negate, value)
|
3
13
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
And /^I click on Login$/ do
|
2
|
-
step %{I hide the keyboard}
|
3
|
-
step %{I click on "poly_Login"}
|
1
|
+
And /^I click on Login$/ do
|
2
|
+
step %{I hide the keyboard}
|
3
|
+
step %{I click on "poly_Login"}
|
4
4
|
end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
# All elements on Welcome page
|
2
|
-
$_RP_OBJECT['poly_SignIn_home'] = {xpath: '//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
|
3
|
-
#All elements on Login page
|
4
|
-
$_RP_OBJECT['poly_DigiD'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[6]/android.view.View[2]/android.widget.EditText[1]'}
|
5
|
-
$_RP_OBJECT['poly_Password'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[7]/android.view.View[2]/android.widget.EditText[1]'}
|
6
|
-
$_RP_OBJECT['poly_Login'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.widget.Button[1]'}
|
7
|
-
$_RP_OBJECT['poly_ErrorMessage'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[10]'}
|
8
|
-
#All elements on Declaration Overview page
|
9
|
-
$_RP_OBJECT['poly_Overview_header'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
|
1
|
+
# All elements on Welcome page
|
2
|
+
$_RP_OBJECT['poly_SignIn_home'] = {xpath: '//android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
|
3
|
+
#All elements on Login page
|
4
|
+
$_RP_OBJECT['poly_DigiD'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[6]/android.view.View[2]/android.widget.EditText[1]'}
|
5
|
+
$_RP_OBJECT['poly_Password'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[7]/android.view.View[2]/android.widget.EditText[1]'}
|
6
|
+
$_RP_OBJECT['poly_Login'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.widget.Button[1]'}
|
7
|
+
$_RP_OBJECT['poly_ErrorMessage'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[10]'}
|
8
|
+
#All elements on Declaration Overview page
|
9
|
+
$_RP_OBJECT['poly_Overview_header'] = {xpath: '//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.view.View[1]/android.view.View[5]'}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
$_RP_OBJECT['textbox1'] = {name: 'TextField1'}
|
2
|
-
$_RP_OBJECT['textbox2'] = {name: 'TextField2'}
|
3
|
-
$_RP_OBJECT['button_sum'] = {name: 'ComputeSumButton'}
|
4
|
-
$_RP_OBJECT['result'] = {name: 'Answer'}
|
5
|
-
$_RP_OBJECT['show_alert'] = {name: 'show alert'}
|
6
|
-
$_RP_OBJECT['alert title'] = {name: 'Cool title'}
|
1
|
+
$_RP_OBJECT['textbox1'] = {name: 'TextField1'}
|
2
|
+
$_RP_OBJECT['textbox2'] = {name: 'TextField2'}
|
3
|
+
$_RP_OBJECT['button_sum'] = {name: 'ComputeSumButton'}
|
4
|
+
$_RP_OBJECT['result'] = {name: 'Answer'}
|
5
|
+
$_RP_OBJECT['show_alert'] = {name: 'show alert'}
|
6
|
+
$_RP_OBJECT['alert title'] = {name: 'Cool title'}
|
@@ -1,37 +1,37 @@
|
|
1
|
-
require 'rspec/expectations'
|
2
|
-
require 'appium_lib'
|
3
|
-
require 'cucumber/ast'
|
4
|
-
require 'Ifd_Mobile'
|
5
|
-
# Define global variables
|
6
|
-
$current_dir = File.expand_path(File.dirname(__FILE__))
|
7
|
-
$base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
|
8
|
-
require "#{$current_dir}/project_env.rb"
|
9
|
-
|
10
|
-
# Create a custom World class so we don't pollute `Object` with Appium methods
|
11
|
-
class AppiumWorld
|
12
|
-
end
|
13
|
-
|
14
|
-
case $_CONFIG['DeviceName'].upcase.to_sym
|
15
|
-
when :IOS
|
16
|
-
Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
|
17
|
-
when :ANDROID
|
18
|
-
Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
|
19
|
-
else
|
20
|
-
raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
|
21
|
-
end
|
22
|
-
|
23
|
-
Appium.promote_appium_methods AppiumWorld
|
24
|
-
|
25
|
-
World do
|
26
|
-
AppiumWorld.new
|
27
|
-
end
|
28
|
-
|
29
|
-
def selenium
|
30
|
-
return $driver
|
31
|
-
end
|
32
|
-
|
33
|
-
# Before { $driver.start_driver }
|
34
|
-
#
|
35
|
-
# After do
|
36
|
-
# $driver.driver_quit
|
1
|
+
require 'rspec/expectations'
|
2
|
+
require 'appium_lib'
|
3
|
+
require 'cucumber/ast'
|
4
|
+
require 'Ifd_Mobile'
|
5
|
+
# Define global variables
|
6
|
+
$current_dir = File.expand_path(File.dirname(__FILE__))
|
7
|
+
$base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
|
8
|
+
require "#{$current_dir}/project_env.rb"
|
9
|
+
|
10
|
+
# Create a custom World class so we don't pollute `Object` with Appium methods
|
11
|
+
class AppiumWorld
|
12
|
+
end
|
13
|
+
|
14
|
+
case $_CONFIG['DeviceName'].upcase.to_sym
|
15
|
+
when :IOS
|
16
|
+
Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
|
17
|
+
when :ANDROID
|
18
|
+
Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
|
19
|
+
else
|
20
|
+
raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
|
21
|
+
end
|
22
|
+
|
23
|
+
Appium.promote_appium_methods AppiumWorld
|
24
|
+
|
25
|
+
World do
|
26
|
+
AppiumWorld.new
|
27
|
+
end
|
28
|
+
|
29
|
+
def selenium
|
30
|
+
return $driver
|
31
|
+
end
|
32
|
+
|
33
|
+
# Before { $driver.start_driver }
|
34
|
+
#
|
35
|
+
# After do
|
36
|
+
# $driver.driver_quit
|
37
37
|
# end
|
@@ -1,9 +1,9 @@
|
|
1
|
-
Before { $driver.start_driver }
|
2
|
-
|
3
|
-
After do
|
4
|
-
begin
|
5
|
-
selenium.driver_quit
|
6
|
-
rescue StandardError => myStandardError
|
7
|
-
puts "\nERROR: *** #{myStandardError}"
|
8
|
-
end
|
1
|
+
Before { $driver.start_driver }
|
2
|
+
|
3
|
+
After do
|
4
|
+
begin
|
5
|
+
selenium.driver_quit
|
6
|
+
rescue StandardError => myStandardError
|
7
|
+
puts "\nERROR: *** #{myStandardError}"
|
8
|
+
end
|
9
9
|
end
|
@@ -1,42 +1,42 @@
|
|
1
|
-
$_CONFIG = Hash.new
|
2
|
-
###################################################################
|
3
|
-
# SYSTEM CONFIGURATION #
|
4
|
-
###################################################################
|
5
|
-
$_CONFIG['Print Log'] = true
|
6
|
-
$_CONFIG['Wait Time'] = 30
|
7
|
-
$_CONFIG['DeviceName'] = '
|
8
|
-
|
9
|
-
###################################################################
|
10
|
-
# DEVICE CONFIGURATION #
|
11
|
-
###################################################################
|
12
|
-
IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
|
13
|
-
ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/
|
14
|
-
def capabilities_ios
|
15
|
-
{
|
16
|
-
'platformName' => 'ios',
|
17
|
-
'deviceName' => 'iPad Air',
|
18
|
-
'platformVersion' => '8.3',
|
19
|
-
'app' => IOS_APP_PATH
|
20
|
-
}
|
21
|
-
end
|
22
|
-
|
23
|
-
def capabilities_android
|
24
|
-
{
|
25
|
-
'platformName' => 'android',
|
26
|
-
'deviceName' => '
|
27
|
-
'fullReset' => '
|
28
|
-
'noReset' => '
|
29
|
-
'platformVersion' => '
|
30
|
-
'app' => ANDROID_APP_PATH
|
31
|
-
}
|
32
|
-
end
|
33
|
-
###################################################################
|
34
|
-
# SERVER CONFIGURATION #
|
35
|
-
###################################################################
|
36
|
-
def server_url
|
37
|
-
"http://127.0.0.1:4723/wd/hub"
|
38
|
-
end
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
1
|
+
$_CONFIG = Hash.new
|
2
|
+
###################################################################
|
3
|
+
# SYSTEM CONFIGURATION #
|
4
|
+
###################################################################
|
5
|
+
$_CONFIG['Print Log'] = true
|
6
|
+
$_CONFIG['Wait Time'] = 30
|
7
|
+
$_CONFIG['DeviceName'] = 'android'
|
8
|
+
|
9
|
+
###################################################################
|
10
|
+
# DEVICE CONFIGURATION #
|
11
|
+
###################################################################
|
12
|
+
IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
|
13
|
+
ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/Bedder_2.0_0.17_VN.apk')
|
14
|
+
def capabilities_ios
|
15
|
+
{
|
16
|
+
'platformName' => 'ios',
|
17
|
+
'deviceName' => 'iPad Air',
|
18
|
+
'platformVersion' => '8.3',
|
19
|
+
'app' => IOS_APP_PATH
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def capabilities_android
|
24
|
+
{
|
25
|
+
'platformName' => 'android',
|
26
|
+
'deviceName' => '4b136e759558724e',
|
27
|
+
'fullReset' => 'true',
|
28
|
+
'noReset' => 'false',
|
29
|
+
'platformVersion' => '5.1.1',
|
30
|
+
'app' => ANDROID_APP_PATH
|
31
|
+
}
|
32
|
+
end
|
33
|
+
###################################################################
|
34
|
+
# SERVER CONFIGURATION #
|
35
|
+
###################################################################
|
36
|
+
def server_url
|
37
|
+
"http://127.0.0.1:4723/wd/hub"
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
|