@nbakka/mcp-appium 2.0.18 → 2.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/server.js +4 -4
- package/package.json +1 -1
package/lib/server.js
CHANGED
|
@@ -144,14 +144,14 @@ const createMcpServer = () => {
|
|
|
144
144
|
});
|
|
145
145
|
tool(
|
|
146
146
|
"mobile_learn_current_app_context",
|
|
147
|
-
"Follow this instructions strictly
|
|
147
|
+
"Follow this instructions strictly to navigate through the app. This should be the first step after launching the app and before performing any tests.",
|
|
148
148
|
{},
|
|
149
149
|
async () => {
|
|
150
150
|
const context = {
|
|
151
151
|
notes: ["when asked to open buy srp use deeeplink to open https://housing.com/in/buy/mumbai/<locality name> For eg: if asked to open 'Mira Road East' buy srp then open following deep link https://housing.com/in/buy/mumbai/mira_road_east", "homepade deeplink-> https://housing.com/in/buy/real-estate-mumbai and project dedicated page deeplink -> https://housing.com/in/buy/projects/page/319874-sunteck-sky-park-by-sunteck-realty-limited-in-mira-road-east",
|
|
152
152
|
"Filters on the filter screen may initially be offscreen and require scrolling to view.",
|
|
153
|
-
"Stop execution if any step fails", "After
|
|
154
|
-
"
|
|
153
|
+
"Stop execution if any step fails", "(Remember this properly - Very important)After the execution is successful/completed, no need to analyze what you found or what you did, only generate appium code",
|
|
154
|
+
"print the java/appium code, in our framework we use following methods waitForElementToBeVisible(\"locator_key\", Wait.SHORT); locator_key is locator key and wait can be SHORT, MEDIUM and LONG, scrollDown(n); -> n is number of times to scroll, navigateBack() for back action, deepLink.OpenDeepLink(\"deeplink_key\") -> deeplink_key is deep link name, getText(\"locator_key\") -> to get text of element. Using the above return code that looks like deepLink.OpenDeepLink(deeplink); //deeplink -> https://housing.com \n waitForElementToBeVisible(\"view_on_map\", Wait.LONG); //view_on_map=//android.widget.TextView[@text=\"View On Map\"]; here xpath should be comments so that I can paste this in xpath sheet and when giving output please remove escape characters before double quotes, do similar for click and sendKeys methods click(\"search_select\") and sendKeys(\"locator_key\", \"string_to_be_passed\", Wait.LONG)",
|
|
155
155
|
|
|
156
156
|
],
|
|
157
157
|
};
|
|
@@ -202,7 +202,7 @@ await new Promise(resolve => setTimeout(resolve, 5000));
|
|
|
202
202
|
return `Opened URL: ${url}`;
|
|
203
203
|
});
|
|
204
204
|
tool("swipe_on_screen", "Swipe on the screen", {
|
|
205
|
-
direction: zod_1.z.enum(["up", "down"]).describe("The direction to swipe"),
|
|
205
|
+
direction: zod_1.z.enum(["up", "down"]).describe("The direction to swipe, up direction means it will from bottom part of the screen to top part of screen, essentially moving the screen content up and opposite happens for down"),
|
|
206
206
|
}, async ({ direction }) => {
|
|
207
207
|
requireRobot();
|
|
208
208
|
await robot.swipe(direction);
|