scope_harness

API

Main classes

Elements

Category
Represents a read-only view of a category returned by scope
CategoryListMatcher
Matcher object that holds constraints for matching search categories.
CategoryListMatcherMode
Match mode for category list
CategoryMatcher
Matcher object that holds constraints for matching search category.
CategoryMatcherMode
Match mode for category results
ChildDepartment
Represents a read-only view of a child department.
ChildDepartmentMatcher
Matcher object that holds constraints for matching child departments of a department.
CustomRegistry
Department
Represents a read-only view of a department returned by a scope. Use id, label, all_label properties to inspect it, and children property or child method to inspect child departments (instances of ChildDepartment). This class supports __getitem__ call...
DepartmentMatcher
Matcher object that holds constraints for matching departments.
DepartmentMatcherMode
Match mode for departments
MatchResult
Represents the result of matching and is the final object you want to check in your tests. An instance of MatchResult can be obtained by calling one of the match() methods of ResultMatcher, CategoryMatcher, CategoryListMatcher, DepartmentMatcher and Ch...
Parameters
Parameters for instantiating a CustomRegistry instace
PreviewColumnMatcher
match( (PreviewColumnMatcher)arg1, (MatchResult)arg2, (object)arg3) -> None
PreviewMatcher
match( (PreviewMatcher)arg1, (MatchResult)arg2, (PreviewWidgetList)arg3) -> None
PreviewView
This is a view on a preview returned by activation of search Result. Set column_count property to the desired number of columns, then inspect widgets in every column using widgets_in_column(index) method.
PreviewWidget
This class represents a single widget of a preview, such as an image or header. The ‘data’ property is a regular python dictionary that corresponds to Scopes API VariantMap and contains actual key-values that constitute the widget. See the ...
PreviewWidgetList
A simple container for preview widgets returned by a scope. The number of widgets can be determined with python’s len() function and individual widgets can be accessed using [] operator. The [] indexing operator supports numeric index values as w...
PreviewWidgetMatcher
Matcher object that holds constraints for matching a preview widget.
Result
Represents a read-only view on a result returned by a scope
ResultMatcher
Matcher object that holds constraints for matching search result.
ResultsView
This is the main class for driving search and inspecting search results. Set search_query property to invoke search, then inspect categories property to access returned categories and their results. Use browse_department method to change active departm...
ScopeHarness
This is the main class for scope harness testing. An instance of it needs to be created using one of the static class methods (new_from_*) before any tests can be perfor
ScopeUri
Helper class for creating scope:// uris
SearchStatus
SettingsMatcher
Matcher object that holds constraints for matchins settings (SettingsView) object.
SettingsMatcherMode
Match mode for settings
SettingsOption
This is a class holding properies of an option
SettingsOptionMatcher
Matcher object that holds constraints for matching a settings option.
SettingsOptionType
SettingsView
This is a view on a scope settings returned by settings() method of ResultsView.
  翻译: