Closed nikhilmaske-2001 closed 2 years ago
@vasani-arpit I am trying to handle this case from long time but I am stuck on it, can you please guide me?
When the input box contains some text we should only send the smartreply
and not with the input box text + smartreply
, to solve this issue I am trying to select that input box value and modify it accordingly, but I am not able to select that input box.
I have tried few stuffs for this like, const messageBox = await page.$("#main > footer > div._2BU3P.tm2tP.copyable-area > div > div > div._2lMWa > div.p3_M1 > div > div._13NKt.copyable-text.selectable-text")
but it does not work.
@nikhilmaske-2001 have you tried xpath to select element instead of css selector?
I have tried this syntax for xpath, is it correct ?
await page.waitForXPath("//#main > footer > div._2BU3P.tm2tP.copyable-area > div > div > div._2lMWa > div.p3_M1 > div > div._13NKt.copyable-text.selectable-text");
let messageBox = await page.$x("//#main > footer > div._2BU3P.tm2tP.copyable-area > div > div > div._2lMWa > div.p3_M1 > div > div._13NKt.copyable-text.selectable-text");
console.log(messageBox);
Ps: this one does not work
When the input box contains some text we should only send the
smartreply
and not with theinput box text + smartreply
,
@vasani-arpit I think this feature is not that important, we can go with the current change included in this PR, and merge this PR now. I will add this task in my to-do list and work on it anyother time, for now we can open a new issue for this with tag enhancement.
Okay. No problem. Bump up the version then I will merge this in master.
@vasani-arpit I have bumped the version on this PR as well as #269 . Both are ready to merge
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
(Bumped version: 0.23.0)
BUG:
clicktosend
feature does not work. Fixes #270Solution: Replace
await page.click("#main footer div.copyable-area div div div button");
withpage.keyboard.press("Enter");
Testing plan: Tested with
clicktosend
true and false valueGIF:![clicktosend](https://user-images.githubusercontent.com/59444243/138637709-dfead444-4a34-45ed-b27d-a0ff3b256ecf.gif)