1,072
edits
| Line 3: | Line 3: | ||
'''Search results for extensions and themes''' | '''Search results for extensions and themes''' | ||
=== Get data from page === | === Get data from page === | ||
'''get_extension_count'''( ) | |||
'''find_extension_in_search_results'''( ''extension_name'', ''extension_url'', ''console_trace=False'' ) | *Returns the number of extensions listed on the current page. Value is returned as an integer. | ||
* Returns the tuple (p, e) where ''p'' is the page the extension was found and ''i'' is the index on the page. | |||
* Parameters: | '''find_extension_in_search_results'''( ''extension_name'', ''extension_url'', ''console_trace=False'' ) | ||
** extension_name: text on name element which must match exactly. | |||
** extension_url: href attribute on name element which must match exactly. | *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. | ||
** console_trace: If True console prints will display the search results as they are checked. | *Parameters: | ||
* Other notes: | **extension_name: text on name element which must match exactly. | ||
** Either extension_name or extension_url must be supplied. | **extension_url: href attribute on name element which must match exactly. | ||
** The method assumes that search results are currently displayed. | **console_trace: If True console prints will display the search results as they are checked. If False no console prints occur. | ||
** 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. | *Other notes: | ||
** If the extension is not found on a page and the page has no link to the Next page then (0,0) is returned. | **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 === | === Get data from an extension === | ||
edits