User Tools

Site Tools


mobile_adaptor

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mobile_adaptor [2023/05/08 14:49]
montse
mobile_adaptor [2024/12/09 12:59] (current)
montse [Functions]
Line 7: Line 7:
 =====Configuration===== =====Configuration=====
  
-All the configuration needed is on the [[en:“Computer Setup for TAST use”]] guide.+All the configuration needed is on the [[“Computer Setup for TAST use”]] guide.
  
 ===== Initialization Parameters ===== ===== Initialization Parameters =====
  
   * **Device:** Nexus7 or custom. Choose custom if you are not using Nexus as an Emulator.   * **Device:** Nexus7 or custom. Choose custom if you are not using Nexus as an Emulator.
-  * **Device Json Capabilities:​** ​Here you need to input your device Json capabilities. It is the same as the ones in Appium. +  * **Device Json Capabilities:​** ​here you need to input your device Json capabilities. It is the same as the ones in Appium. 
-  * **URL HUB:​** ​This is the URL for your hub. http://​localhost:​4723/​wd/​hub is the default. +  * **URL HUB:​** ​this is the URL for your hub. http://​localhost:​4723/​wd/​hub is the default. 
-  * **URL Browser:​** ​This is where you put the URL you want to search for if you want to use a browser. +  * **URL Browser:​** ​this is where you put the URL you want to search for if you want to use a browser. 
-  * **Validate insert values:​** ​Validates ​the values, checks if they are the same that were inserted. +  * **Validate insert values:​** ​validates ​the values, checks if they are the same that were inserted. 
-  * **Full Screenshot:​** ​To take a complete screenshot. +  * **Full Screenshot:​** ​to take a complete screenshot. 
-  * **Incognito mode:​** ​To start the browser in incognito mode.+  * **Incognito mode:​** ​to start the browser in incognito mode.
   ​   ​
 ===== Functions ===== ===== Functions =====
-  * **activateApp(App package):​** ​This function activates (brings to the foreground) the application that was specified and is not currently active, or running on the background. You specify the app package in the parameter.\\ \\  +  * **activateApp(App package):​** ​this function activates (brings to the foreground) the application that was specified and is not currently active, or running on the background. You specify the app package in the parameter.\\ \\  
-  * **clear(Element):​** ​Clears ​the value of the element.\\ \\  +  * **clear(Element):​** ​clears ​the value of the element.\\ \\  
-  * **clearAndType(InputElement)**: ​Clears ​the value of the element, and writes below.\\ \\  +  * **clearAndType(InputElement)**: ​clears ​the value of the element, and writes below.\\ \\  
-  * **clearNotificationBar**: ​Clears ​messages from the notification bar. Optional Xpath parameter to clean button.\\ \\  +  * **clearNotificationBar**: ​clears ​messages from the notification bar. Optional Xpath parameter to clean button.\\ \\  
-  * **click(Element):​** ​Clicks ​on a specific element.\\ \\  +  * **click(Element):​** ​clicks ​on a specific element.\\ \\  
-  * **clickLink(Element):​** ​Clicks ​on an element that is a link.\\ \\  +  * **clickLink(Element):​** ​clicks ​on an element that is a link.\\ \\  
-  * **closeAllWindows():​** ​Closes ​all open windows.\\ \\  +  * **closeAllWindows():​** ​closes ​all open windows.\\ \\  
-  * **closeApp():​** ​Closes ​the application.\\ \\  +  * **closeApp():​** ​closes ​the application.\\ \\  
-  * **countElements(Element):​** ​Counts ​found elements html and saves value to integer variable. The parameter is Element, with this we can indicate which part of the html the user wants to count, for example, if the user want to count the elements of the body, the body will be the parameter.\\ \\  +  * **countElements(Element):​** ​counts ​found elements html and saves value to integer variable. The parameter is Element, with this we can indicate which part of the html the user wants to count, for example, if the user want to count the elements of the body, the body will be the parameter.\\ \\  
-  * **executeBridgeMobileCommand(Command):​** ​Execute ​ADB shell commands on Appium (e.g. adb uninstall package). Link for useful ADB commands:​ https://​www.inviul.com/​adb-commands/​. This function is recommended for advanced users.\\ \\  +  * **executeBridgeMobileCommand(Command):​** ​execute ​ADB shell commands on Appium (e.g. adb uninstall package). Link for useful ADB commands:​ https://​www.inviul.com/​adb-commands/​. This function is recommended for advanced users.\\ \\  
-  * **executeMobileCommand(CommandName,​ JSONArguments):​** ​It is used to execute mobile commands, such as batteryInfo,​ swipe, drag, etc. Allows the use of JSON arguments.\\ \\  +  * **executeMobileCommand(CommandName,​ JSONArguments):​** ​it is used to execute mobile commands, such as batteryInfo,​ swipe, drag, etc. Allows the use of JSON arguments.\\ \\  
-  * **getAttribute(Element,​ Attribute):​** ​Gets the text, value or attribute from the element and stores it in a variable.\\ \\   +  * **getAttribute(Element,​ Attribute):​** ​gets the text, value or attribute from the element and stores it in a variable.\\ \\   
-  * **getNotificationText():​** ​Gets the notification text from the notification area. Optionally, removes notifications from this area.\\ \\  +  * **getNotificationText():​** ​gets the notification text from the notification area. Optionally, removes notifications from this area.\\ \\  
-  * **installApp(appPath):​** ​Installs ​an application. The specified .apk file has to be a path on your PC.\\ \\  +  * **installApp(appPath):​** ​installs ​an application. The specified .apk file has to be a path on your PC.\\ \\  
-  * **isAppInstalled(appId):​** ​Checks ​if an application is installed.\\ \\    +  * **isAppInstalled(appId):​** ​checks ​if an application is installed.\\ \\    
-  * **isExist(Element):​** ​Checks ​if the element exists and prints result on user log file. The input parameter Element will be the element the function has to check.\\ \\  +  * **isExist(Element):​** ​checks ​if the element exists and prints result on user log file. The input parameter Element will be the element the function has to check.\\ \\  
-  * **javascriptExecuteWithParameters(code,​ argument):​** ​Allows ​the execution of custom Javascript Code during the test, with the values as parameters.\\ \\   +  * **javascriptExecuteWithParameters(code,​ argument):​** ​allows ​the execution of custom Javascript Code during the test, with the values as parameters.\\ \\   
-  * **networkSettings (wifi, data, airplanemode):​** ​Sets the network configuration of the device. The parameters allow you to enable or disable Wifi, data and airplane mode. Data can only be enabled and disabled on rooted devices or emulators. Airplane mode only works on OS 6.0 and below.\\ \\  +  * **networkSettings (wifi, data, airplanemode):​** ​sets the network configuration of the device. The parameters allow you to enable or disable Wifi, data and airplane mode. Data can only be enabled and disabled on rooted devices or emulators. Airplane mode only works on OS 6.0 and below.\\ \\  
-  * **openUrl(String URL):​** ​Opens the specified URL in a browser.\\ \\  +  * **openUrl(String URL):​** ​opens the specified URL in a browser.\\ \\  
-  * **pressBack():​** ​Presses ​the “Back” button on the device.\\ \\  +  * **pressBack():​** ​presses ​the “Back” button on the device.\\ \\  
-  * **pressHome():​** ​Presses ​the “Home” button on the device.\\ \\  +  * **pressHome():​** ​presses ​the “Home” button on the device.\\ \\  
-  * **pressOverview():​** ​Presses ​the “Menu” (app overview) button on the device.\\ \\  +  * **pressOverview():​** ​presses ​the “Menu” (app overview) button on the device.\\ \\  
-  * **removeApp(appId):​** ​Uninstalls ​the specified application from the device.\\ \\  +  * **removeApp(appId):​** ​uninstalls ​the specified application from the device.\\ \\  
-  * **runAppInBackground:​** ​Run the application in the background.\\ \\  +  * **runAppInBackground:​** ​run the application in the background.\\ \\  
-  * **scrollToElement(Element):​** ​Scrolls ​up or down to the specified element.\\ \\ +  * **scrollToElement(Element):​** ​scrolls ​up or down to the specified element.\\ \\ 
   * **select**:​\\ \\   * **select**:​\\ \\
-  * **sendSMS(Phone number, Text):​** ​Sends an SMS to the device. Only works in emulator.\\ \\  +  * **sendSMS(Phone number, Text):​** ​sends an SMS to the device. Only works in emulator.\\ \\  
-  * **startApp(appPackage,​ appActivity):​** ​Launches ​the specified application.\\ \\  +  * **startApp(appPackage,​ appActivity):​** ​launches ​the specified application.\\ \\  
-  * **submit(Element):​** ​Click on the element and send the form.\\ \\  +  * **submit(Element):​** ​click on the element and send the form.\\ \\  
-  * **swipeScreen():​** ​Drag the screen in one direction. Accepts duration, number of times to drag, and start and end coordinates.\\ \\  +  * **swipeScreen():​** ​drag the screen in one direction. Accepts duration, number of times to drag, and start and end coordinates.\\ \\  
-  * **switchToNativeApp():​** ​Switches ​to Native App mode.\\ \\  +  * **switchToNativeApp():​** ​switches ​to Native App mode.\\ \\  
-  * **switchToWebView():​** ​Switches ​to Web View mode.\\ \\  +  * **switchToWebView():​** ​switches ​to Web View mode.\\ \\  
-  * **terminateApp(identifier,​ JSONArguments):​** ​Closes ​the specified application. Accepts JSON arguments.\\ \\  +  * **terminateApp(identifier,​ JSONArguments):​** ​closes ​the specified application. Accepts JSON arguments.\\ \\  
-  * **type(InputElement):​** ​Adds the typed value to the already existing value of the element.\\ \\  +  * **type(InputElement):​** ​adds the typed value to the already existing value of the element.\\ \\  
-  * **validateAttribute(Element,​ Attribute, Operator, Value to validate):​** ​Validates ​element attributes like: id, class, href, size, width, value, text … etc. Print result on user log file.\\ \\  +  * **validateAttribute(Element,​ Attribute, Operator, Value to validate):​** ​validates ​element attributes like: id, class, href, size, width, value, text … etc. Print result on user log file.\\ \\  
-  * **waitFor(Time in seconds):​** ​Waits for the specified time in seconds.\\ \\  +  * **waitFor(Time in seconds):​** ​waits for the specified time in seconds.\\ \\  
-  * **waitForElement(Time in seconds, Element):​** ​This function waits for the specified item to appear on the screen.\\ \\ +  * **waitForElement(Time in seconds, Element):​** ​this function waits for the specified item to appear on the screen.\\ \\ 
    
 +
mobile_adaptor.1683557344.txt.gz · Last modified: 2023/05/08 14:49 by montse