MCPcopy Create free account
hub / github.com/GCWing/BitFun / findTextarea

Method findTextarea

tests/e2e/page-objects/components/ChatInput.ts:64–89  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62 }
63
64 private async findTextarea(): Promise<WebdriverIO.Element | null> {
65 const selectors = [
66 '.rich-text-input[contenteditable="true"]',
67 '.bitfun-chat-input__input-area [contenteditable="true"]',
68 '[contenteditable="true"]',
69 '[data-testid="chat-input-textarea"]',
70 '.chat-input textarea',
71 'textarea[class*="chat"]',
72 ];
73
74 for (const selector of selectors) {
75 try {
76 const element = await $(selector);
77 const exists = await element.isExisting();
78 if (exists) {
79 console.log(`[ChatInput] Found input element with selector: ${selector}`);
80 return element;
81 }
82 } catch (e) {
83 // Continue
84 }
85 }
86
87 console.log('[ChatInput] Input element not found with any selector');
88 return null;
89 }
90
91 async typeMessage(message: string): Promise<void> {
92 const input = await this.findTextarea();

Callers 6

typeMessageMethod · 0.95
getValueMethod · 0.95
clearMethod · 0.95
getPlaceholderMethod · 0.95
focusMethod · 0.95
isFocusedMethod · 0.95

Calls 2

$Function · 0.50
logMethod · 0.45

Tested by

no test coverage detected