First off I’ll admit that I am a complete Javascript novice. After searching for a few hours through this forum and stack exchange though, I thought I would try asking for help here.
I’m trying to use KM to click a button on a Chrome page. There are 50 of the same button on the web page; the only difference being a variable gets passed to change the customer number. The link looks like this:
<a class=“btn btn-default btn-xs” ng-if=“customer.PartnerCanGuestAdminister && customer.CustomerStatus != ‘Closed’” ng-click="$ctrl.setGuestAdminHiddenValues(customer.CustomerNumber)" href=“javascript:__doPostBack(‘ctl00$ctl00$cphBMB$cphMB$ctl01’,’’)”>
I have a database that will be able to pass the customer.CustomerNumber. So what I’m looking for is what Javascript do I pass to Chrome from KM to simulate this button click? (This is assuming, that I will be passing it with the customer number. ie. “$ctrl.setGuestAdminHiddenValues(c6df0a01-921d-4997-a1cf-a79300e78c16)”
The Xpath example in this forum doesn’t work for me since I need to pass a variable and since this button uses a class instead of an ID. [WEB] Click on Link Using XPath [Example]
Any help you can offer would be much appreciated-