diff --git a/.gitignore b/.gitignore index 05a98be9..a3e5cfba 100644 --- a/.gitignore +++ b/.gitignore @@ -174,8 +174,8 @@ cython_debug/ # PyPI configuration file .pypirc -*.csv -*.yaml +!*.csv +!*.yaml *.jpg *.json *.log diff --git a/optics_framework/samples/gallery/config.yml b/optics_framework/samples/gallery/config.yml new file mode 100644 index 00000000..dec2fc20 --- /dev/null +++ b/optics_framework/samples/gallery/config.yml @@ -0,0 +1,33 @@ +driver_sources: + - appium: + enabled: true + url: "http://localhost:4723" + capabilities: + deviceName: R9ZX30AKE6M + platformName: Android + platformVersion: "16" + automationName: UiAutomator2 + appPackage: com.sec.android.gallery3d + appActivity: .app.GalleryActivity + noReset: true + newCommandTimeout: 300 + +elements_sources: + - appium_find_element: + enabled: true + - appium_page_source: + enabled: true + - appium_screenshot: + enabled: true + +text_detection: + - easyocr: + enabled: true + +image_detection: + - templatematch: + enabled: true + +log_level: INFO +json_log: true +file_log: true \ No newline at end of file diff --git a/optics_framework/samples/gallery/modules/modules.csv b/optics_framework/samples/gallery/modules/modules.csv new file mode 100644 index 00000000..fdbe68db --- /dev/null +++ b/optics_framework/samples/gallery/modules/modules.csv @@ -0,0 +1,36 @@ +module_name,module_step,param_1,param_2,param_3,param_4,param_5 + +Launch Gallery App,Launch App,com.sec.android.gallery3d,,, +Launch Gallery App,Sleep,3,,,, + +Open Sidebar,Press Element,${menu_icon_image},,, +Open Sidebar,Sleep,2,,,, +Open Sidebar,Press Element,${pictures_option_image},,, +Open Sidebar,Sleep,2,,,, + +Navigate To Pictures,Press Element,${pictures_option_image},,, +Navigate To Pictures,Sleep,2,,,, + +Open Search,Press Element,${search_icon_image},,, +Open Search,Sleep,4,,,, + +Scroll To Search,Scroll,down,,, +Scroll To Search,Sleep,2,,,, + +Enter Search Text,Detect And Press,${search_input_image},10,, +Enter Search Text,Enter Text Direct,gurugram,, +Enter Search Text,Sleep,3,,,, + +Select Image,Detect And Press,${first_image_image},10,, +Select Image,Sleep,2,,,, + +Delete Image Flow,Detect And Press,${delete_icon_image},10,, +Delete Image Flow,Sleep,2,,,, + +Confirm Delete,Detect And Press,${move_to_recycle_bin_image},10,, +Confirm Delete,Sleep,2,,,, + +Delete Multiple Images,Run Loop,Delete Image Flow,2,,, + +Close Gallery App,Force Terminate App,com.sec.android.gallery3d,,, +Close Gallery App,Close And Terminate App,,,, \ No newline at end of file diff --git a/optics_framework/samples/gallery/test_cases/test_cases.csv b/optics_framework/samples/gallery/test_cases/test_cases.csv new file mode 100644 index 00000000..cc8c8302 --- /dev/null +++ b/optics_framework/samples/gallery/test_cases/test_cases.csv @@ -0,0 +1,15 @@ +test_case,test_step + +Suite Setup,Launch Gallery App +Suite Setup,Open Sidebar + +Main Flow,Navigate To Pictures +Main Flow,Open Search +Main Flow,Scroll To Search +Main Flow,Enter Search Text +Main Flow,Select Image + +Delete Flow,Delete Image Flow +Delete Flow,Confirm Delete + +Suite Teardown,Close Gallery App \ No newline at end of file diff --git a/optics_framework/samples/gallery/test_data/elements.csv b/optics_framework/samples/gallery/test_data/elements.csv new file mode 100644 index 00000000..2e6e5e34 --- /dev/null +++ b/optics_framework/samples/gallery/test_data/elements.csv @@ -0,0 +1,16 @@ +Element_Name,Element_ID_xpath,Element_ID,Element_Text + +menu_icon_image,"//android.widget.ImageButton[@content-desc=""Open navigation drawer""]",menu_icon.png, +pictures_option_image,"//android.widget.TextView[@text=""Pictures""]",pictures_option.png,Pictures + +search_icon_image,"//android.widget.ImageView[@content-desc=""Search""]",search_icon.png, +search_input_image,"//android.widget.EditText",search_input.png, + +first_image_image,"(//android.widget.ImageView)[1]",first_image.png, + +delete_icon_image,"//android.widget.ImageView[@content-desc=""Delete""]",delete_icon.png,Delete + +move_to_recycle_bin_image,"//android.widget.Button[@text=""Move to Recycle bin""]",move_to_recycle_bin.png,Move to Recycle bin +cancel_delete_image,"//android.widget.Button[@text=""Cancel""]",cancel_delete.png,Cancel + +recycle_bin_toast_image,"//android.widget.Toast",recycle_toast.png, \ No newline at end of file diff --git a/optics_framework/samples/gallery/test_data/input_templates/cancel_delete.png b/optics_framework/samples/gallery/test_data/input_templates/cancel_delete.png new file mode 100644 index 00000000..3230c4ed Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/cancel_delete.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/delete_icon.png b/optics_framework/samples/gallery/test_data/input_templates/delete_icon.png new file mode 100644 index 00000000..6590a116 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/delete_icon.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/first_image.png b/optics_framework/samples/gallery/test_data/input_templates/first_image.png new file mode 100644 index 00000000..a674b943 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/first_image.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/gallery_tab.png b/optics_framework/samples/gallery/test_data/input_templates/gallery_tab.png new file mode 100644 index 00000000..af7a344d Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/gallery_tab.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/menu_icon.png b/optics_framework/samples/gallery/test_data/input_templates/menu_icon.png new file mode 100644 index 00000000..cc776405 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/menu_icon.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/pictures_option.png b/optics_framework/samples/gallery/test_data/input_templates/pictures_option.png new file mode 100644 index 00000000..d525a029 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/pictures_option.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/recycle_toast.png b/optics_framework/samples/gallery/test_data/input_templates/recycle_toast.png new file mode 100644 index 00000000..777825b8 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/recycle_toast.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/search_icon.png b/optics_framework/samples/gallery/test_data/input_templates/search_icon.png new file mode 100644 index 00000000..ef80c5c8 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/search_icon.png differ diff --git a/optics_framework/samples/gallery/test_data/input_templates/search_input.png b/optics_framework/samples/gallery/test_data/input_templates/search_input.png new file mode 100644 index 00000000..0ee821c5 Binary files /dev/null and b/optics_framework/samples/gallery/test_data/input_templates/search_input.png differ