User Tools

Site Tools


en:mobile_adaptor

Differences

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

Link to this comparison view

en:mobile_adaptor [2022/03/21 11:12]
montse [Functions]
— (current)
Line 1: Line 1:
-====== Mobile Adaptor ====== 
- 
-=====Introduction===== 
- 
-This adapter is used to use and interact with android devices, including both physical devices and emulators. 
- 
-=====Configuration===== 
- 
-All the configuration needed is on the [[en:​“Computer Setup for TAST use”]] guide. 
- 
-===== Initialization Parameters ===== 
- 
-  * **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. 
-  * **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. 
-  * **Validate insert values:** Validates the values, checks if they are the same that were inserted. 
-  * **Full Screenshot:​** To take a complete screenshot. 
-  * **Incognito mode:** To start the browser in incognito mode. 
-  ​ 
-===== Functions ===== 
- 
-  * **clear(Element):​** Clears the value of the element.\\ \\  
-  * **clearAndType(InputElement):​** Clears the value of the element and types.\\ \\  
-  * **click(Element):​** Clicks on a specific element.\\ \\  
-  * **clickLink(Element):​** Clicks on the specified element as a link.\\ \\  
-  * **closeAllWindows():​** Closes all currently open windows.\\ \\  
-  * **closeApp():​** Closes the app.\\ \\  
-  * **executeMobileCommand(CommandName,​ JSONArguments):​** Used to execute mobile commands, like batteryInfo,​ or swipe, drag, etc. Allows the use of JSON Arguments.\\ \\  
-  * **getAttribute(Attribute):​** Gets text, value or attribute of the element and saves it to a variable.\\ \\  ​ 
-  * **getNotificationText():​** Obtains the notification text from the notification area. Optionally, removes notifications from this area.\\ \\  
-  * **installApp(appPath):​** Installs an app. The .apk must be on the specified path to your PC.\\ \\  
-  * **isAppInstalled(appId):​** Checks if an app is installed.\\ \\  
-  * **javascriptExecuteWithParameters(code,​ argument):​** Allows execution of custom Javascript code during the test with the values as parameters.\\ \\  ​ 
-  * **openUrl(String URL):** Opens the specified URL in a browser.\\ \\  
-  * **removeApp(appId):​** Uninstalls the app from the device.\\ \\  
-  * **scrollToElement(Element):​** Scrolls down or up to the specified element.\\ \\  
-  * **sendSMS(Phone number, Text):** Sends an SMS to the device. Only works on emulator.\\ \\  
-  * **startApp(appPackage,​ appActivity):​** Starts the specified app.\\ \\  
-  * **submit(Element):​** Clicks on the element and sends the form.\\ \\  
-  * **swipeScreen():​** Swipes the screen in a direction. Accepts duration, number of times to swipe, and start and end coordinates.\\ \\  
-  * **switchToNativeApp():​** Switches to Native App mode.\\ \\  
-  * **switchToWebView():​** Switches to Web View mode.\\ \\  
-  * **terminateApp(identifier,​ JSONArguments):​** Closes the specified App. Accepts JSON Arguments.\\ \\  
-  * **type(InputElement):​** Adds the specified value to the already existing value of the element.\\ \\  
-  * **waitFor(Time in seconds):** Waits the specified time in seconds.\\ \\  
-  * **waitForElement(Time in seconds, Element):** This function waits for the specified element to appear on screen.\\ \\  
- 
  
en/mobile_adaptor.1647861120.txt.gz · Last modified: 2022/03/21 11:12 by montse