Skip to content

Commit 7e9f76b

Browse files
authored
Merge pull request #2153 from surishubham/main
Merge pull request #2152 from sakshamarora-arch/stage
2 parents 1b86db2 + 3930235 commit 7e9f76b

File tree

10 files changed

+488
-3
lines changed

10 files changed

+488
-3
lines changed
98.4 KB
Loading
99.1 KB
Loading
99 KB
Loading
98.7 KB
Loading
98.2 KB
Loading

docs/appium-androidtv.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
id: appium-androidtv
3+
title: Android TV Automation
4+
sidebar_label: Android TV
5+
description: Learn how to automate Android TV apps using Appium with a step-by-step tutorial and sample Python code.
6+
keywords:
7+
- android tv
8+
- appium
9+
- automation
10+
- androidtv
11+
- nvidia shield
12+
- python
13+
url: https://www.lambdatest.com/support/docs/appium-androidtv
14+
site_name: LambdaTest Docs
15+
slug: appium-androidtv
16+
17+
---
18+
19+
import CodeBlock from '@theme/CodeBlock';
20+
import {YOUR_LAMBDATEST_USERNAME, YOUR_LAMBDATEST_ACCESS_KEY} from "@site/src/component/keys";
21+
22+
import Tabs from '@theme/Tabs';
23+
import TabItem from '@theme/TabItem';
24+
25+
<script type="application/ld+json"
26+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
27+
"@context": "https://schema.org",
28+
"@type": "BreadcrumbList",
29+
"itemListElement": [{
30+
"@type": "ListItem",
31+
"position": 1,
32+
"name": "Home",
33+
"item": "https://www.lambdatest.com"
34+
},{
35+
"@type": "ListItem",
36+
"position": 2,
37+
"name": "Support",
38+
"item": "https://www.lambdatest.com/support/docs/"
39+
},{
40+
"@type": "ListItem",
41+
"position": 3,
42+
"name": "Apple TV With Appium",
43+
"item": "https://www.lambdatest.com/support/docs/appium-appletv/"
44+
}]
45+
})
46+
}}
47+
></script>
48+
## Tutorial To Run Your First Test On LambdaTest
49+
---
50+
As smart TVs continue to grow in popularity, relying solely on manual testing is no longer sufficient. Automating Android TV testing provides broader device coverage, enhances user experience by validating remote-based navigation and voice commands, and eliminates repetitive manual tasks. It also helps uncover issues earlier in the development cycle, ensuring a smooth and consistent experience across different Android TV models.
51+
In this guide, you will learn how to set up and run your **Android TV** automation testing scripts with **Appium** on the **LambdaTest Real Device Cloud platform**.
52+
53+
> To enable it for your organization, please contact us via <span className="doc__lt" onClick={() => window.openLTChatWidget()}>**24×7 chat support**</span> or you can also drop a mail to **[email protected]**.<br />
54+
55+
## Objective
56+
---
57+
By the end of this topic, you will be able to:
58+
59+
1. Set up an environment for testing your Apps using **Android TV** with **Appium**.
60+
2. Understand and configure the core capabilities required for your Appium test suite.
61+
3. Explore the advanced features of LambdaTest.
62+
63+
## Prerequisites
64+
65+
---
66+
67+
Before you can start performing App automation testing with Appium, you would need to follow these steps:
68+
69+
- You have access to LambdaTest username and accessKey. If you have not registered yet, you can do the same by visiting our [website](https://accounts.lambdatest.com/register). You will be able to access the credentials in the [LambdaTest Profile](https://accounts.lambdatest.com/detail/profile)
70+
- Install the latest Python build from the [official website](https://www.python.org/downloads/). We recommend using the latest version.
71+
- Make sure **pip** is installed in your system. You can install **pip** from [pip documentation](https://pip.pypa.io/en/stable/installation/).
72+
73+
---
74+
## Supported Models
75+
76+
| Device Model | Platform Version |
77+
|----------------------|------------------|
78+
| Nvidia Shield TV | Android 11 |
79+
80+
## Run Your First Test
81+
---
82+
### 1. Upload your application
83+
Upload your **Android TV** application (.ipa file) to the LambdaTest servers using our **REST API**. You need to provide your **Username** and **AccessKey** in the format `Username:AccessKey` in the **cURL** command for authentication. Make sure to add the path of the **appFile** in the cURL request. Here is an example cURL request to upload your app using our REST API:
84+
85+
**Using App File from System:**
86+
<div className="lambdatest__codeblock">
87+
<CodeBlock className="language-bash">
88+
{`curl -u "undefined:undefined" -X POST "https://manual-api.lambdatest.com/app/upload/realDevice" -F "appFile=@"/Users/macuser/Downloads/android-tv-sample-app.apk"" -F "name="androidtv_app" -F "type="androidtv""
89+
`}
90+
</CodeBlock>
91+
</div>
92+
93+
94+
### 2. Set Up Authentication
95+
96+
Make sure you have your LambdaTest credentials with you to run test automation scripts on LambdaTest. To obtain your access credentials, [purchase a plan](https://billing.lambdatest.com/billing/plans) or access the [Automation Dashboard](https://appautomation.lambdatest.com/). Then, set LambdaTest `Username` and `Access Key` in environment variables with following commands.
97+
98+
<Tabs className="docs__val">
99+
100+
<TabItem value="bash" label="Linux / MacOS" default>
101+
<div className="lambdatest__codeblock">
102+
<CodeBlock className="language-bash">
103+
{`export LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \\
104+
export LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
105+
</CodeBlock>
106+
</div>
107+
108+
</TabItem>
109+
110+
<TabItem value="powershell" label="Windows" default>
111+
112+
<div className="lambdatest__codeblock">
113+
<CodeBlock className="language-powershell">
114+
{`set LT_USERNAME=${ YOUR_LAMBDATEST_USERNAME()} \`
115+
set LT_ACCESS_KEY=${ YOUR_LAMBDATEST_ACCESS_KEY()}`}
116+
</CodeBlock>
117+
</div>
118+
119+
</TabItem>
120+
</Tabs>
121+
122+
### 3. Configure Desired Capabilities
123+
124+
In your automation script, set up the **platform capability** to specify that you are testing on an Android TV device.
125+
126+
<Tabs>
127+
<TabItem value="Python" label="Python" default>
128+
129+
```python
130+
desired_caps = {
131+
"deviceName" : "Nvidia Shield TV",
132+
"platformVersion" : "11",
133+
#highlight-next-line
134+
"platform" : "androidtv",
135+
"isRealMobile":True,
136+
"build": "Android TV Testing",
137+
"app":"APP_URL", # Enter app url here
138+
"network": False,
139+
"geoLocation": "FR",
140+
"devicelog": True,
141+
"privateCloud": True, # For private cloud testing
142+
"visual" : True,
143+
"autoGrantPermissions": True
144+
145+
}
146+
```
147+
148+
</TabItem>
149+
</Tabs>
150+
151+
## Additional Links
152+
153+
---
154+
155+
- [Advanced Configuration for Capabilities](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/)
156+
- [How to test locally hosted apps](https://www.lambdatest.com/support/docs/testing-locally-hosted-pages/)
157+
- [How to integrate LambdaTest with CI/CD](https://www.lambdatest.com/support/docs/integrations-with-ci-cd-tools/)
158+
159+
<nav aria-label="breadcrumbs">
160+
<ul className="breadcrumbs">
161+
<li className="breadcrumbs__item">
162+
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com">
163+
Home
164+
</a>
165+
</li>
166+
<li className="breadcrumbs__item">
167+
<a className="breadcrumbs__link" target="_self" href="https://www.lambdatest.com/support/docs/">
168+
Support
169+
</a>
170+
</li>
171+
<li className="breadcrumbs__item breadcrumbs__item--active">
172+
<span className="breadcrumbs__link">
173+
Roku TV With Appium
174+
</span>
175+
</li>
176+
</ul>
177+
</nav>
178+
179+
180+

docs/apple-pay-auto.md

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
id: apple-pay-auto
3+
title: Apple Pay Automation on Real Devices
4+
sidebar_label: Apple Pay
5+
description: Learn how to automate Apple Pay flows on iOS public devices, including capabilities, payment injection, passcode entry, and limitations.
6+
keywords:
7+
- Apple Pay
8+
- iOS
9+
- automation
10+
- testing
11+
- payment
12+
slug: apple-pay-auto/
13+
site_name: LambdaTest
14+
url: https://www.lambdatest.com/support/docs/apple-pay-auto/
15+
---
16+
import CodeBlock from '@theme/CodeBlock';
17+
import Tabs from '@theme/Tabs';
18+
import TabItem from '@theme/TabItem';
19+
20+
# Apple Pay Automation on Real Devices
21+
22+
**Apple Pay** is Apple’s secure digital wallet and payment system that enables purchases, one-click checkouts, and adds an extra layer of protection for financial transactions. In real-world apps and websites, Apple Pay is widely used for simplifying checkout experiences, reducing friction, and improving user trust.
23+
24+
For **testing payment flows**, validating Apple Pay becomes critical. Automation of Apple Pay ensures you can reliably test end-to-end purchase scenarios, confirm that payment sheets open correctly, details are pre-filled, and transactions are processed securely—without relying on production cards.
25+
26+
With LambdaTest, you can automate Apple Pay flows on **real iOS devices**. From provisioning Wallet with sandboxed test cards, to injecting payment details, confirming payments, and entering the passcode, LambdaTest provides a seamless way to run and validate Apple Pay scenarios as part of your automation suite.
27+
28+
> To enable it for your organization, please contact us via <span className="doc__lt" onClick={() => window.openLTChatWidget()}>**24×7 chat support**</span> or you can also drop a mail to **[email protected]**.<br />
29+
30+
---
31+
## Use Cases
32+
33+
- **Checkout Validation**: Ensure your in-app or web checkout flow works seamlessly with Apple Pay as a payment method.
34+
- **End-to-End Payment Testing**: Validate that Apple Pay sheets open correctly, test cards are provisioned, and transactions are processed end-to-end.
35+
- **CI/CD Integration**: Run Apple Pay scenarios as part of continuous integration pipelines to catch payment flow issues early.
36+
- **Cross-Network Stability**: Test across Visa, MasterCard, and other networks to ensure consistent user experiences.
37+
- **Security & Compliance**: Confirm that sensitive flows like passcode entry and secure card handling behave as expected during automation.
38+
39+
---
40+
## Supported Devices
41+
Currently, the Device Passcode feature in App Automation is enabled on the following iOS real devices:
42+
43+
| iOS Device | iOS Version |
44+
|--------------|-------------|
45+
| iPhone 16 | 18 |
46+
| iPhone 15 | 17 |
47+
| iPhone 14 | 16 |
48+
| iPhone 13 | 15 |
49+
50+
> We are actively working on expanding coverage to **all supported iOS devices** on LambdaTest Real Device Cloud.
51+
---
52+
## Capabilities
53+
54+
| Capability | Type | Default | Required / Optional | Description |
55+
|----------------------------|------------|---------|---------------------|---------------------------------------------------------------------------------------------|
56+
| **applePay** | Boolean | true | Mandatory | Enables Apple Pay provisioning including Wallet, Sandbox card, AssistiveTouch, and Passcode on supported real iOS devices. |
57+
| **applePayCardType** | Array | None | Optional | Specify preferred payment networks. Currently, you can choose from four supported cards: ["American Express", "Visa", "MasterCard", "Discover Global Network"].
58+
|
59+
60+
---
61+
62+
## Apple Pay Workflow in Automation Test
63+
64+
### Step 1: Upload Your App to LambdaTest
65+
66+
1. **Uploading Your App** – Follow the detailed steps in our [Upload Your Application](https://www.lambdatest.com/support/docs/upload-your-application/) guide.
67+
2. Once uploaded, **note the App ID** returned by the API or dashboard.
68+
3. Use this **App ID** in the `"app"` capability in your automation script.
69+
70+
---
71+
### Step 2: Add Desired Capabilities
72+
73+
To enable Apple Pay automation, include the following capability in your automation session as highlighted in the Capabilities:
74+
75+
76+
<Tabs>
77+
78+
<TabItem value="ios" label="iOS">
79+
<CodeBlock className="language-java">
80+
{`desired_caps = {
81+
"deviceName": "iPhone 16",
82+
"platformName": "iOS",
83+
"platformVersion": "18",
84+
"isRealMobile": True,
85+
"app": "YOUR_APP_ID",
86+
"build": "Sample Build",
87+
"name": "Sample Test",
88+
// highlight-next-line
89+
"applePay": true,
90+
// highlight-next-line
91+
"applePayCardType": ["Visa", "Mastercard"],
92+
}`}
93+
</CodeBlock>
94+
</TabItem>
95+
</Tabs>
96+
97+
:::info
98+
99+
- You must add the generated **APP_URL** to the `app` capability in the config file.
100+
- You can generate capabilities for your test requirements with the help of our inbuilt [**Capabilities Generator tool**](https://www.lambdatest.com/capabilities-generator/). For more details, please refer to our guide on [**Desired Capabilities in Appium**](https://www.lambdatest.com/support/docs/desired-capabilities-in-appium/).
101+
102+
:::
103+
104+
---
105+
106+
### Step 3: Confirm Apple Pay Payment
107+
108+
- To confirm Apple Pay payment at the payment step, add a hook to confirm and complete the payment.
109+
- This can be done using LambdaTest hooks. A sample script is provided below to trigger confirmation of the Apple Pay payment step:
110+
111+
112+
```python
113+
driver.execute_script(
114+
'lambda_executor: {"action": "applePay", "arguments": {"confirmPayment": "true"}}'
115+
)
116+
```
117+
118+
---
119+
120+
### Step 4: Enter Passcode to Complete Payment
121+
122+
- After confirming the Apple Pay payment, the device will prompt for the passcode to securely authorize the transaction. Your automation script must handle this prompt by entering the passcode using Appium's keyboard input methods to simulate the user securely confirming the payment.
123+
124+
125+
```Python
126+
driver.find_element(By.XPATH,"//*[@name=\"Passcode field\"]").send_keys("123456")
127+
```
128+
129+
:::info
130+
The default passcode is `123456` unless configured differently on the device. This step is essential to simulate secure confirmation and complete the Apple Pay transaction during automation.
131+
:::

0 commit comments

Comments
 (0)