1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-10-30 14:44:09 +00:00

UiAutomatorWorkloads: Updated to use the new parameter passing functionality.

Each workload has be modfied to remove the old manual paremeter conversion
and instead to retrieve the desired type from the parameter bundle directly.
This commit is contained in:
Marc Bonnici
2017-02-09 16:49:12 +00:00
parent d10e51e30b
commit 8f1206678a
35 changed files with 43 additions and 51 deletions

View File

@@ -94,11 +94,11 @@ class Googleplaybooks(AndroidUxPerfWorkload):
def validate(self):
super(Googleplaybooks, self).validate()
self.uiauto_params['search_book_title'] = self.search_book_title.replace(' ', '0space0')
self.uiauto_params['search_book_title'] = self.search_book_title
# If library_book_title is blank, set it to the same as search_book_title
if not self.library_book_title: # pylint: disable=access-member-before-definition
self.library_book_title = self.search_book_title # pylint: disable=attribute-defined-outside-init
self.uiauto_params['library_book_title'] = self.library_book_title.replace(' ', '0space0')
self.uiauto_params['library_book_title'] = self.library_book_title
self.uiauto_params['chapter_page_number'] = self.select_chapter_page_number
self.uiauto_params['search_word'] = self.search_word
self.uiauto_params['account'] = self.account

View File

@@ -51,8 +51,8 @@ public class UiAutomation extends UxPerfUiAutomation implements ApplaunchInterfa
parameters = getParams();
String searchBookTitle = parameters.getString("search_book_title").replace("0space0", " ");
String libraryBookTitle = parameters.getString("library_book_title").replace("0space0", " ");
String searchBookTitle = parameters.getString("search_book_title");
String libraryBookTitle = parameters.getString("library_book_title");
String chapterPageNumber = parameters.getString("chapter_page_number");
String searchWord = parameters.getString("search_word");
String noteText = "This is a test note";