|
|
(2 intermediate revisions by the same user not shown) |
Line 3: |
Line 3: |
| *[[QA/Execution/Web Testing/Docs/Automation/Testcases/AMO POM Libraries/Utilities|Utilities]] | | *[[QA/Execution/Web Testing/Docs/Automation/Testcases/AMO POM Libraries/Utilities|Utilities]] |
| *Base page class | | *Base page class |
| *AMO pages class | | *[[QA/Execution/Web Testing/Docs/Automation/Testcases/AMO POM Libraries/amo_page class|amo_page class]] |
| | | *[[QA/Execution/Web Testing/Docs/Automation/Testcases/AMO POM Libraries/Search results pages|Search results pages]] |
| *[[QA/Execution/Web Testing/Docs/Automation/Testcases/AMO POM Libraries/Search results pages|Search results pages]] | |
| | |
| <br>
| |
| | |
| == Extensions search results page ==
| |
| | |
| '''Search results for extensions and themes'''
| |
| | |
| === Get data from page ===
| |
| | |
| '''get_extension_count'''( )
| |
| | |
| *Returns the number of extensions listed on the current page. Value is returned as an integer.
| |
| | |
| '''find_extension_in_search_results'''( ''extension_name'', ''extension_url'', ''console_trace=False'' )
| |
| | |
| *Returns the tuple (p, e) where ''p'' is the page the extension was found and ''i'' is the index on the page. An exception is thrown if extension is not found on any pages.
| |
| *Parameters:
| |
| **extension_name: text on name element which must match exactly.
| |
| **extension_url: href attribute on name element which must match exactly.
| |
| **console_trace: If True console prints will display the search results as they are checked. If False no console prints occur.
| |
| *Other notes:
| |
| **Either extension_name or extension_url must be supplied.
| |
| **The method assumes that search results are currently displayed.
| |
| **If the extension is not found on the first page the methods selects the Next link in the listing footer, if it exists, to display the next page.
| |
| **If the extension is not found on a page and the page has no link to the Next page then (0,0) is returned.
| |
| | |
| === Get data from an extension ===
| |
| | |
| The following get_extension_x methods return an element from an extension from the current page. The value is retrieved from the ''listing_index''-th item.
| |
| | |
| '''get_extension_name'''( ''listing_index'' )
| |
| | |
| *Returns the text from the name element
| |
| | |
| '''get_extension_name_link'''( ''listing_index'' )
| |
| | |
| *Returns the href attribute in the name element
| |
| | |
| '''get_extension_image_link'''( ''listing_index'' )
| |
| | |
| *Returns the href attribute in the image element
| |
| | |
| '''get_extension_info'''( ''listing_index'' )
| |
| | |
| *Returns the text on the info element
| |
| | |
| '''get_extension_rating_title'''( ''listing_index'' )
| |
| | |
| *Returns the title attribute in the rating element
| |
| | |
| '''get_extension_updated_date_as_date'''( ''listing_index'' )
| |
| | |
| *Returns the date with the Updated label from the info section. Value is returned as a date type.
| |
| | |
| '''get_extension_review_count_as_integer'''( ''listing_index'' )
| |
| | |
| *Returns the count with the Reviews label from the info section. Value is returned as an integer.
| |
| | |
| '''get_extension_download_count_as_integer'''( ''listing_index'' )
| |
| | |
| *Returns the count with the Weekly Downloads label from the info section. Value is returned as an integer.
| |
| | |
| === Actions ===
| |
| | |
| '''click_sort_option_in_header'''( ''sort_option'' )
| |
| | |
| *Clicks on a sort option in the listing header. Clicks on the sort option link which contains ?sort=''sort_option'' in its href.
| |