Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

TextBox data is lost!

Post Reply
asparagas
Posts: 17
Joined: Sun Nov 24, 2019 11:36 pm

TextBox data is lost!

Post by asparagas »

Hi,

TextBoxes on some web pages

Chromium1.browser.MainFrame.ExecuteJavaScript ( 'document.getElementByID("userid").value="123"', 'about: blank', 0 );

I assign values as follows and the assignments I make appear in the boxes, but when I click on the boxes, those values disappear as if no assignment was made.

How do I solve this problem?

thank you in advance...
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: TextBox data is lost!

Post by salvadordf »

Hi,

This seems to be some kind of protection against automation tools in those pages.

I guess you will have the same issue if you execute that JavaScript code from the console tab in the DevTools.

If the application uses a browser in OSR mode then try setting the focus on the browser and simulating a mouse click over the TextBox before executing the JS code.
Post Reply