Ifd_Mobile 0.1.1 → 0.1.2
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_web.rb +70 -69
- data/lib/Ifd_Mobile/methods/IFD_Assertion.rb +44 -44
- data/lib/Ifd_Mobile/methods/core.rb +136 -136
- data/lib/Ifd_Mobile/methods/lib_var.rb +53 -53
- data/lib/Ifd_Mobile/version.rb +1 -1
- data/lib/LICENSE +3 -0
- data/project/Gemfile +7 -7
- 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/TestApp/build/release-iphonesimulator/TestApp.app/Info.plist +0 -0
- data/project/features/android/Android_test1.feature +14 -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 +2 -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 +72 -5
- data/project/features/support/hooks.rb +24 -24
- data/project/features/support/project_env.rb +41 -41
- metadata +45 -44
@@ -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,15 @@
|
|
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
|
-
# And I input text "11122233" on "poly_DigiD"
|
12
|
-
# And I input text "12345" on "poly_Password"
|
13
|
-
# And I click on Login
|
14
|
-
# Then I verify property "poly_ErrorMessage" with "name" has value "Invalid credentials."
|
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
|
+
# And I input text "11122233" on "poly_DigiD"
|
12
|
+
# And I input text "12345" on "poly_Password"
|
13
|
+
# And I click on Login
|
14
|
+
# Then I verify property "poly_ErrorMessage" with "name" has value "Invalid credentials."
|
15
15
|
# * 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,3 @@
|
|
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
3
|
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,9 +1,76 @@
|
|
1
|
+
require 'rspec/expectations'
|
2
|
+
require 'appium_lib'
|
3
|
+
require 'cucumber/ast'
|
4
|
+
require 'Ifd_Mobile'
|
5
|
+
|
1
6
|
# Define global variables
|
2
7
|
$current_dir = File.expand_path(File.dirname(__FILE__))
|
3
8
|
$base_dir = File.expand_path(File.dirname(__FILE__) + '/../..')
|
4
9
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
+
$_CONFIG = Hash.new
|
11
|
+
# ###################################################################
|
12
|
+
# # SYSTEM CONFIGURATION #
|
13
|
+
# ###################################################################
|
14
|
+
$_CONFIG['Print Log'] = true
|
15
|
+
$_CONFIG['Wait Time'] = 20
|
16
|
+
$_CONFIG['DeviceName'] = 'ios'
|
17
|
+
|
18
|
+
|
19
|
+
# require "#{$current_dir}/PolyClaim_env.rb"
|
20
|
+
|
21
|
+
# Create a custom World class so we don't pollute `Object` with Appium methods
|
22
|
+
class AppiumWorld
|
23
|
+
end
|
24
|
+
|
25
|
+
def server_url
|
26
|
+
'http://127.0.0.1:4723/wd/hub'
|
27
|
+
end
|
28
|
+
|
29
|
+
IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
|
30
|
+
ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/polyclaim.cordova.android.201510083238.apk')
|
31
|
+
def capabilities_ios
|
32
|
+
{
|
33
|
+
'platformName' => 'ios',
|
34
|
+
'deviceName' => 'iPad Air',
|
35
|
+
'platformVersion' => '8.3',
|
36
|
+
'app' => IOS_APP_PATH,
|
37
|
+
'rotatable' => true
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
def capabilities_android
|
42
|
+
{
|
43
|
+
'platformName' => 'android',
|
44
|
+
# 'deviceName' => 'emulator-5554',
|
45
|
+
'deviceName' => '4d0079394a1e2129',
|
46
|
+
'fullReset' => 'fullReset',
|
47
|
+
'noReset' => 'true',
|
48
|
+
'platformVersion' => '4.4.2',
|
49
|
+
'app' => ANDROID_APP_PATH
|
50
|
+
}
|
51
|
+
end
|
52
|
+
|
53
|
+
case $_CONFIG['DeviceName'].upcase.to_sym
|
54
|
+
when :IOS
|
55
|
+
Appium::Driver.new({caps: capabilities_ios, appium_lib: {server_url: server_url}}).start_driver
|
56
|
+
when :ANDROID
|
57
|
+
Appium::Driver.new({caps: capabilities_android, appium_lib: {server_url: server_url}}).start_driver
|
58
|
+
else
|
59
|
+
raise "\nERROR: *** Invalid Device Name!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
|
60
|
+
end
|
61
|
+
|
62
|
+
Appium.promote_appium_methods AppiumWorld
|
63
|
+
|
64
|
+
World do
|
65
|
+
AppiumWorld.new
|
66
|
+
end
|
67
|
+
|
68
|
+
def selenium
|
69
|
+
return $driver
|
70
|
+
end
|
71
|
+
|
72
|
+
Before { $driver.start_driver }
|
73
|
+
|
74
|
+
After do
|
75
|
+
$driver.driver_quit
|
76
|
+
end
|
@@ -1,24 +1,24 @@
|
|
1
|
-
Before do
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
17
|
-
|
18
|
-
After do
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
end
|
1
|
+
# Before do
|
2
|
+
# begin
|
3
|
+
# def selenium
|
4
|
+
# case $_CONFIG['DeviceName'].upcase.to_sym
|
5
|
+
# when :IOS
|
6
|
+
# @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_ios, :url => server_url)
|
7
|
+
# when :ANDROID
|
8
|
+
# @driver ||= Selenium::WebDriver.for(:remote, :desired_capabilities => capabilities_android, :url => server_url)
|
9
|
+
# else
|
10
|
+
# puts "\nERROR: *** Invalid Device Nane!. Please check the config from $_CONFIG['DeviceName'] = #{$_CONFIG['DeviceName']}"
|
11
|
+
# end
|
12
|
+
# end
|
13
|
+
# rescue StandardError => myStandardError
|
14
|
+
# put_log "\nERROR: *** #{myStandardError}"
|
15
|
+
# end
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# After do
|
19
|
+
# begin
|
20
|
+
# selenium.quit
|
21
|
+
# rescue StandardError => myStandardError
|
22
|
+
# puts "\nERROR: *** #{myStandardError}"
|
23
|
+
# end
|
24
|
+
# end
|
@@ -1,41 +1,41 @@
|
|
1
|
-
$_CONFIG = Hash.new
|
2
|
-
###################################################################
|
3
|
-
# SYSTEM CONFIGURATION #
|
4
|
-
###################################################################
|
5
|
-
$_CONFIG['Print Log'] = true
|
6
|
-
$_CONFIG['Wait Time'] = 30
|
7
|
-
$_CONFIG['DeviceName'] = 'IOS'
|
8
|
-
###################################################################
|
9
|
-
# DEVICE CONFIGURATION #
|
10
|
-
###################################################################
|
11
|
-
IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
|
12
|
-
ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/selendroid-test-app.apk')
|
13
|
-
def capabilities_ios
|
14
|
-
{
|
15
|
-
'platformName' => 'ios',
|
16
|
-
'deviceName' => 'iPad Air',
|
17
|
-
'platformVersion' => '8.3',
|
18
|
-
'app' => IOS_APP_PATH
|
19
|
-
}
|
20
|
-
end
|
21
|
-
|
22
|
-
def capabilities_android
|
23
|
-
{
|
24
|
-
'platformName' => 'android',
|
25
|
-
'deviceName' => 'emulator-5554',
|
26
|
-
'fullReset' => 'fullReset',
|
27
|
-
'noReset' => 'true',
|
28
|
-
'platformVersion' => '4.4.2',
|
29
|
-
'app' => ANDROID_APP_PATH
|
30
|
-
}
|
31
|
-
end
|
32
|
-
###################################################################
|
33
|
-
# SERVER CONFIGURATION #
|
34
|
-
###################################################################
|
35
|
-
def server_url
|
36
|
-
"http://127.0.0.1:4723/wd/hub"
|
37
|
-
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
1
|
+
$_CONFIG = Hash.new
|
2
|
+
###################################################################
|
3
|
+
# SYSTEM CONFIGURATION #
|
4
|
+
###################################################################
|
5
|
+
$_CONFIG['Print Log'] = true
|
6
|
+
$_CONFIG['Wait Time'] = 30
|
7
|
+
$_CONFIG['DeviceName'] = 'IOS'
|
8
|
+
###################################################################
|
9
|
+
# DEVICE CONFIGURATION #
|
10
|
+
###################################################################
|
11
|
+
IOS_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/TestApp/build/release-iphonesimulator/TestApp.app')
|
12
|
+
ANDROID_APP_PATH = File.join(File.dirname(__FILE__), '../../apps/selendroid-test-app.apk')
|
13
|
+
def capabilities_ios
|
14
|
+
{
|
15
|
+
'platformName' => 'ios',
|
16
|
+
'deviceName' => 'iPad Air',
|
17
|
+
'platformVersion' => '8.3',
|
18
|
+
'app' => IOS_APP_PATH
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def capabilities_android
|
23
|
+
{
|
24
|
+
'platformName' => 'android',
|
25
|
+
'deviceName' => 'emulator-5554',
|
26
|
+
'fullReset' => 'fullReset',
|
27
|
+
'noReset' => 'true',
|
28
|
+
'platformVersion' => '4.4.2',
|
29
|
+
'app' => ANDROID_APP_PATH
|
30
|
+
}
|
31
|
+
end
|
32
|
+
###################################################################
|
33
|
+
# SERVER CONFIGURATION #
|
34
|
+
###################################################################
|
35
|
+
def server_url
|
36
|
+
"http://127.0.0.1:4723/wd/hub"
|
37
|
+
end
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
|