chat-helpers.ts 536 B

12345678910111213141516
  1. // kilocode_change - new file
  2. import { type Page } from "@playwright/test"
  3. import { findWebview } from "./webview-helpers"
  4. export async function getChatInput(page: Page) {
  5. const webviewFrame = await findWebview(page)
  6. const chatInput = webviewFrame.locator('textarea, input[type="text"]').first()
  7. await chatInput.waitFor()
  8. return chatInput
  9. }
  10. export async function sendMessage(page: Page, message: string): Promise<void> {
  11. const chatInput = await getChatInput(page)
  12. await chatInput.fill(message)
  13. await chatInput.press("Enter")
  14. }