Java script emulation of the button
string enterLogin1 = @"
document.getElementsByTagName('textarea')[0].value = 'Hello';
document.getElementsByTagName('textarea')[0].keypress();
“;
browser.EvaluateScriptAsync(enterLogin1)
On the screenshot example that the text is inserted but the text field for sending is not active - https://prnt.sc/G5OcfbQR9y6s
I don’t want to do that 😔
We get a link to the item to which we want to emulate the Enter button.
const element = document.getElementById ('myElement');
Create a new Keyboard Event
const event = new KeyboardEvent('keydown', {
key: 'Enter', // Show that this is the Enter event
keyCode: 13, // Enter key code
Bubbles: true // Let the event "ship" on the DOM tree
and the
Dispatch (send) the event to the element
element.dispatchEvent (event)
Client's review of cooperation with Bogdan Hlimbovsky
Java script emulation of the buttonA lot of thanks! The task is performed well!
Freelancer's review of cooperation with Anton Egorov
Java script emulation of the buttonA great customer. It was all good)
-
Почему вы используете браузер ? Есть же бесплатное API для доступа к функциям GPT чата. В апи больше возможностей, работа не только с чат ботом, но и с изображением и звуками. Так как API бесплатно. Вы можете его использовать. Это быстрее удобнее и качественнее чем эмуляция работы браузера. У меня есть собственные разработки доступа к API. Если вам нужна помощь, обращайтесь.
-
Current freelance projects in the category C#
Creation of a plugin for integration with the POS system Syrve, C#Develop a plugin for the Syrve POS system (on-premise), which is installed on the establishment's server. The plugin must: (1) transmit data to our server in real-time — orders, table statuses, payments, receipts; (2) receive commands from Reservble — booking confirmations,… C#, Web Programming ∙ 1 day 12 hours back ∙ 11 proposals |
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32.
113 USD
Creation or refinement of firmware and logic for three autonomous LoRa stations based on ESP32. The devices must set up a Wi-Fi access point, serve a local site via a browser (HTTP), receive text and images within a radius of 5-10 km (plus or minus), store data (preferably on… C & C++, C# ∙ 1 day 19 hours back ∙ 3 proposals |
S1GG1LA person is needed who can take the initial code of the Minecraft launcher for the project, change the design at their discretion, but there are small style requirements for it to be in purple tones. Regarding payment, please suggest a price for the work. However, the budget is… C#, Gaming Apps ∙ 4 days 4 hours back ∙ 7 proposals |
Improvement in the existing version of 1C retail block for the distribution center (DC)In general, I will explain what kind of database we have - There is a main server where there is a retail database (where all receipts are recorded) - a UTP database - where all sales are transferred - it calculates the markup and stock balances - small databases of retail… C & C++, C# ∙ 9 days 4 hours back ∙ 6 proposals |
It is necessary to migrate the current working program from FoxPro to C#.Hello everyone! We have a program in FoxPro (it has several modules, it's an accounting program), we have the source code of the program, and if necessary, we can consult with people who support the current program. What needs to be done: 1. Analyze how everything works,… C#, Desktop Apps ∙ 11 days 19 hours back ∙ 19 proposals |