Skip to content

Commit 73f68f6

Browse files
committed
kane ai guidelines
1 parent 45fe58e commit 73f68f6

File tree

2 files changed

+115
-11
lines changed

2 files changed

+115
-11
lines changed
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
id: kane-ai-web-test-writing-guidelines
3+
title: KaneAI Web Agent - Guidelines for Writing Instructions
4+
hide_title: false
5+
sidebar_label: Web Agent Instruction Guide
6+
description: Learn how to write instructions for running the kane ai web agent smoothly and without any problem
7+
keywords:
8+
- lambdatest automation
9+
- lambdatest kaneai
10+
- kaneai Web test
11+
- kaneai guidelines
12+
- instructions writings
13+
url: https://www.lambdatest.com/support/docs/kane-ai-web-test-writing-guidelines
14+
site_name: LambdaTest
15+
slug: kane-ai-web-test-writing-guidelines/
16+
---
17+
18+
import Tabs from '@theme/Tabs';
19+
import TabItem from '@theme/TabItem';
20+
21+
<script type="application/ld+json"
22+
dangerouslySetInnerHTML={{ __html: JSON.stringify({
23+
"@context": "https://schema.org",
24+
"@type": "BreadcrumbList",
25+
"itemListElement": [{
26+
"@type": "ListItem",
27+
"position": 1,
28+
"name": "Home",
29+
"item": "https://www.lambdatest.com"
30+
},{
31+
"@type": "ListItem",
32+
"position": 2,
33+
"name": "Support",
34+
"item": "https://www.lambdatest.com/support/docs/"
35+
},{
36+
"@type": "ListItem",
37+
"position": 3,
38+
"name": "KaneAI Web Test",
39+
"item": "https://www.lambdatest.com/support/docs/kane-ai-web-test-writing-guidelines"
40+
}]
41+
})
42+
}}
43+
></script>
44+
The KaneAI Web Agent is an automation tool that executes web interactions based on natural language instructions. This guide provides best practices for writing clear, user-friendly instructions when using the KaneAI Web Agent. The goal is to ensure accurate execution of tasks by the AI and improve the quality of interactions with web elements.
45+
46+
## General Instruction
47+
48+
### 1. Clarity and Specificity
49+
Always provide clear and specific instructions for the action you wish to perform. Use the appropriate terminology from the list of supported commands. Avoid vague terms such as `do this` or `click that`—be explicit about which element to interact with.
50+
51+
### 2. Context
52+
When the action is dependent on a specific element or section of a webpage, provide enough context to help identify the element. Example: `Click the 'Submit' button on the top right corner of the form`.
53+
54+
### 3. Step-by-Step Instructions
55+
Break down complex tasks into smaller, manageable steps. Use logical connectors like `then` or `after that` to indicate the sequence of actions. Clearly specify the flow, such as `Click 'Login', then type your email in the input field.`
56+
57+
### 4. Use Examples
58+
Refer to the examples provided in the list of supported commands for guidance on structuring your instructions.
59+
Example: `Type 'username' in the search bar and press 'Enter' to submit.`
60+
61+
### 5. Wait Command
62+
Use the wait command when needed to pause execution, allowing operations or page loads to complete before proceeding to the next action. Example: `Click 'Submit' and wait for 5 seconds before proceeding to the next step.`
63+
64+
### 6. Refining Prompts
65+
If the AI response is not as expected, refine your prompt by adding more details or increasing clarity. Use iterative refinement to achieve the desired outcome.
66+
67+
### 7. Tab Targeting
68+
When interacting with elements that open in a new tab, use the prompt `switch to the <TabTitle> tab` to ensure actions stay on the newly opened tab.
69+
70+
## DO's & DON'Ts
71+
72+
### DO's
73+
- **Specify the Exact Element :** Clearly indicate which element you want to interact with. For instance, use the element's name, position, or attributes.
74+
Example: `Click on the second product in the list.`
75+
76+
- **Use Action Verbs :** Start your instructions with action verbs like "Click," "Type," "Hover," etc.
77+
Example: `Hover over the navigation bar.`
78+
79+
- **Provide Context for Conditional Actions :** If the action depends on an element’s visibility or existence, include this in the instruction. Example: `If the 'Login' button is visible, click it.`
80+
81+
- **Use Numbers to Indicate Positions or Quantities :** When specifying positions or quantities, use numbers for clarity. Example: `Scroll down 100 pixels.`
82+
83+
- **Verify Steps Before Saving Test Cases :** Use the re-run option to ensure KaneAI executes all steps correctly and without errors before saving the test case.
84+
85+
- **Validate Test Flow While Editing :** Let the test run to validate if the flow is correct while editing a test case. Click "Resume" only after all steps are completed.
86+
87+
- **Use Manual Interaction When Necessary :** If KaneAI struggles to execute the desired action, manually intervene to guide the AI appropriately.
88+
89+
### DON'Ts
90+
- **Avoid Vague Terms :** Do not use terms like "Click that" or "Do this" without specifying which element or action.
91+
92+
- **Do Not Assume Context Without Detail :** Ensure instructions are detailed enough for the AI to understand which elements are involved. Example of what to avoid: `Click the button" (without specifying which button)`.
93+
94+
- **Avoid Overloading Instructions :** Do not combine too many actions into a single instruction unless they are logically sequenced. Example of what to avoid: `Click the button and type in the field and then hover.`
95+
96+
- **Do Not Mix Unrelated Commands Without Logical Sequence :** Keep commands logically connected. Avoid mixing different actions without specifying the sequence. Example of what to avoid: `Click and then go to a new tab (without a clear sequence)`.
97+
98+
- **Always Verify Results for Assertions :** When using assertions, confirm that the expected result occurs to ensure success.
99+
100+
- **Acknowledge AI Limitations :** If the AI doesn’t perform the desired action, refine the prompt instead of expecting perfect results on the first try.
101+
102+
- **Use Iterative Approach for Accuracy :** Allow the AI to process, execute the action, and respond. If the initial outcome isn’t correct, refine and reissue the prompt iteratively.
103+
104+
- **Avoid Unnecessary Jargon :** Use simple language to communicate instructions. Only use technical terms when necessary.

sidebars.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,27 +1010,27 @@ module.exports = {
10101010
"why-we-need-kane-ai",
10111011
"kane-ai-web-test",
10121012
"kane-ai-guided-walkthrough",
1013+
"kane-ai-app-test",
1014+
"kane-ai-test-plan"
10131015
],
10141016
},
10151017
{
1016-
type: "doc",
1017-
label: "App Test",
1018-
id: "kane-ai-app-test"
1019-
},
1020-
{
1021-
type: "doc",
1022-
label: "Test Plan",
1023-
id: "kane-ai-test-plan"
1018+
type: "category",
1019+
collapsed: true,
1020+
label: "Features",
1021+
items: [
1022+
"kane-ai-javascript-execution",
1023+
"kane-ai-geolocation-tunnel-proxy",
1024+
"kane-ai-scroll-in-feature"
1025+
],
10241026
},
10251027
{
10261028
type: "category",
10271029
collapsed: true,
10281030
label: "Knowledge Base",
10291031
items: [
10301032
"kane-ai-command-guide",
1031-
"kane-ai-javascript-execution",
1032-
"kane-ai-geolocation-tunnel-proxy",
1033-
"kane-ai-scroll-in-feature"
1033+
"kane-ai-web-test-writing-guidelines"
10341034
],
10351035
},
10361036
{

0 commit comments

Comments
 (0)