Home > Software engineering >  Web page automatic question, WebBrowser1
Web page automatic question, WebBrowser1

Time:09-16

Web automation problems consult, the company SAP system, to pull report, high frequency, a VB knowledge, put together a small program, has now been implemented automatically log in, click on each function button to automatically report query page, arriving at condition input menu, the terms on the right side of the text box how to also have no way to find, please help to give directions, I white web, text id="WD33" WebBrowser1. Document. The getElementById (" WD33 "). The Value="https://bbs.csdn.net/topics/xxx", the picture

CodePudding user response:

Problems added: the main page of text box can use WebBrowser1. The Document. The getElementById (" aa "). The Value="https://bbs.csdn.net/topics/xxx" to find and fill in, is to report search (right hand side), which all the elements are unable to use WebBrowser1. The Document. The getElementById (" bb "). The Value="https://bbs.csdn.net/topics/yy", WebBrowser1. Document. The getElementById (" cc "). The click is an error, please the teachers guidance, thank you very much

CodePudding user response:

In firefox browser to open, don't know the right mouse button on the page elements of point, choose view elements,

CodePudding user response:

The element information is as follows: & lt; input id="WD33" ct="CBS" lsdata="https://bbs.csdn.net/topics/{0:'WD33',5:'FREETEXT',7:'WD34',20:11,25:'CLIENT_SERVER_PREFIX',26:'F4LOOKUP',32:11,33:false,34:true,35:'VALUE1'}" lsevents="{Change:[{ResponseData:'delta',EnqueueCardinality:'single'},{}],DeleteItem:[{ResponseData:'delta'},{}],Select:[{ResponseData:'delta'},{}],Enter:[{ResponseData:'delta',ClientAction:'submit'},{}],ListAccess:[{ResponseData:'delta',ClientAction:'submitAsync'},{}],ClipboardTablePaste:[{ResponseData:'delta',ClientAction:'submit'},{}]}" autocomplete="off" size="11" maxlength="11" tabindex="0" ti="0" value="" role="combobox" name="WD33" style="vertical-align:top;" Type="text" & gt;; Statement: WebBrowser1. Document. GetElementById (" WD33 "). The Value="https://bbs.csdn.net/topics/xxx" is not successful

CodePudding user response:

See if that a few class definition, the default is not allowed to fill in at the beginning,
UrEdf2TxtEnbl
UrEdf2TxtRadius
urBorderBox

CodePudding user response:

Fill in the permissions is some, I don't have any problems, manual input is the crux of the problem is the statement: WebBrowser1. Document. The getElementById (" WD33 ") Value="https://bbs.csdn.net/topics/xxx" is not successful, but every page id is able to operate through the statement, button, text box, is this the right side of the page can not catch a, I don't know HTML, is more than the so-called framework (baidu), embedded, this statement doesn't work? Very dizzy

CodePudding user response:

Possible, continue to look up one layer, the parent table, and then upwards, is there a frame,
Or look at your document. The frames have any things

CodePudding user response:

Don't know whether I & lt; Iframe> Can't catch the elements in this, almost all the iframe name="isolatedWorkArea", what statement would it be possible for me to get below the iframe element, the teachers give written opinions, for this thing, uncomfortable

CodePudding user response:

WebBrowser1. Document. Frames (0) said the first frame

CodePudding user response:

Still not solve the problem, is there a teacher to help look, ah, now is certainly has three nested iframe, format is what I need in third iframe label, also achieved a dynamic url, just can't operating elements inside

CodePudding user response:

Webbrowser. Document. Frame (I). The document. The frame (j) document. The frame (k). The document. The getElementById (" bb "). The Value="https://bbs.csdn.net/topics/yy"

CodePudding user response:

Ajax code generated by the element not to be found in the DocumentComplete time, because the page is just finished downloading, didn't execute scripts, can set a timer to wait for a few seconds to find again,

CodePudding user response:

Upstairs to watch for:
1, bosses
2, 5 o 'clock in the morning

CodePudding user response:

Now a lot of web page loaded, but not the WebBrowser DocumentComplete judgment

CodePudding user response:

refer to 12th floor crispy big ice cream reply:
upstairs to watch for:
1, bosses
2, 5 am less than
bosses in the United States, haven't normal time from work in the afternoon?

CodePudding user response:



Check out bosses...

CodePudding user response:

Since this is your own system, why also use web automation, data transmission is not better, directly,
  • Related