Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ cython_debug/
# PyPI configuration file
.pypirc

*.csv
*.yaml
!*.csv
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this needed?

!*.yaml
*.jpg
*.json
*.log
Expand Down
33 changes: 33 additions & 0 deletions optics_framework/samples/gallery/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
driver_sources:
- appium:
enabled: true
url: "http://localhost:4723"
capabilities:
deviceName: R9ZX30AKE6M
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modify this to an emulator-5554
that is the standard for android studio emulators

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
36 changes: 36 additions & 0 deletions optics_framework/samples/gallery/modules/modules.csv
Original file line number Diff line number Diff line change
@@ -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,,,,
15 changes: 15 additions & 0 deletions optics_framework/samples/gallery/test_cases/test_cases.csv
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions optics_framework/samples/gallery/test_data/elements.csv
Original file line number Diff line number Diff line change
@@ -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,
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading