1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.platform.helpers; 18 19 public interface IPlayStoreHelper extends IAppHelper { 20 /** 21 * Setup expectations: The app is open. 22 * 23 * Looks for the search bar or button by scrolling up or pressing back. It then enters a query, 24 * and displays the results. This method blocks until the results are selectable. 25 */ 26 public void doSearch(String query); 27 28 /** 29 * Setup expectations: There are visible search results. 30 * 31 * Selects the first search result card and blocks until the app's install page is open. 32 */ 33 public void selectFirstResult(); 34 35 /** 36 * Setup expectations: An app's install page is open, but the app is not installed. 37 * 38 * Press the install button and dismiss any confirmation dialogs. This method will block until 39 * the app starts downloading, though installation cannot be guaranteed. 40 */ 41 public void installApp(); 42 43 /** 44 * Setup expectations: An app's install page is open. 45 * 46 * @return true, if the app is already installed, or false if not. 47 */ 48 public boolean isAppInstalled(); 49 50 /** 51 * Setup expectations: An app's install page is open, and the app is installed. 52 * 53 * Press the uninstall button. This method will block until 54 * the app completes uninstallation, though uninstallation cannot be guaranteed. 55 */ 56 public void uninstallApp(); 57 } 58