VB.NET DOM help for HTML |
VB.NET DOM help for HTML |
troyedwards |
Jul 20 2019, 10:35 PM
Post
#1
|
Group: Members Posts: 8 Joined: 20-July 19 Member No.: 26,938 |
Hi guys we have to log in to bank account every day and either print off 1 page of our bank statement OR save the statement to CSV. I am trying to automate this process such that when our managers come in the 1 page bank statement has already by printed and is sitting on the printer (and we have saved the day to CSV).
There are no APIs that I can get hold off atm, so I am using VB.NET and the DOM. I can automate the login process, and select a specific bank account however some of my managers have access to several business known as different bank profiles. Basically I need to know how to select a specific value in the combo box however in the HTML its not a <SELECT> tag. Instead the banks uses profilelistview and each of the business's have a unique profile id, ie data-profileId="6767901001620df51020114442000005". I can drill extract this profile id but I don't know how to pass it. Its not like ?data-profileId="6767901001620df51020114442000005 <li id="Administration.CustomerProfile.GetAllProfilesWidget"> <div id="widget-222a94daa40b4845ab2b6171cceba92a" class="widget administration-customerprofile-getallprofileswidget" data-selected-profile-id=""6767901001620151020114442000005"" data-select-customer-profile-action="https://banking.westpac.com.au/secure/banking/authentication/profileswitch" data-set-flyout-visibility-cookie="https://banking.westpac.com.au/secure/banking/firstsignin/setflyoutvisibilitycookie" data-profile-list-view-url="https://banking.westpac.com.au/secure/banking/overview/profilelistview" data-verifycustomerprofile="https://banking.westpac.com.au/secure/banking/administration/verifycustomer" data-switchtosuspendedprofilemessage="The profile you're trying to access has been suspended. Please select another profile or call us on 1300 655 505 for help." data-limitedaccessprofileswitchmessage="This profile is inactive or outside allowable access days. Please contact your Administrator for access." data-isemulationmode="False" data-analytics-nav="col-main"> <div class="administration-customerprofile-getallprofileswidget flyout-cell flyout-cell-open"> <a id="profile-switch-flyout" href="#" class="flyout-menu-toggle btn btn-small">LUWIN INVESTMENTS PTY LTD - Business banking <span class="a11y-context">Click to open profile</span> <img src="https://banking.westpac.com.au/secure/banking/Themes/Default/Desktop/WBC/Core/Images/Patterns1.1/icon-menu-arrow-down.png.d857629e7141d53add72b4707cbe5df6fec017d6.png" alt="" /> </a> <div class="flyout-below flyout flyout-menu"> <div class="customer-action-flyoutwrapper"> <ul class="flyout-menu-list"> <li> <div class="selected-profile-item" data-profileId="6767901001620df51020114442000005" data-isPersonalProfile="False" data-profileName = "MY COMPANY PTY LTD" data-profileType="Business banking" data-isActivationRequired="False" data-isAccessibleToday="True" data-isExpired="False" data-accessPeriod="" id="67679010016201510254314442000005"> <span class="flyout-menu-heading">MY COMPANY PTY LTD</span> <span class="flyout-menu-item">Business banking</span> </div> Attached thumbnail(s) |
CharlesEF |
Sep 15 2019, 09:15 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
As far as I know, data attributes are not passed when you submit a form. The only way I know of is to place a hidden input element in the form and use Javascript to set the value of that element. When you set that value depends on you. You could use an onchange or onblur event to fire Javascript to set the hidden element value. Or, maybe you could add the logic to your validation process? Or maybe the onsubmit event. If you have a AJAX call maybe you don't need to set any hidden elements. You just use Javascript to set the name/value pair for each data attribute you need.
|
Lo-Fi Version | Time is now: 29th March 2024 - 07:52 PM |