Jump to content
Clément

Click a link in EDGE Browser

Recommended Posts

In this project I'm downloading a page in EdgeBrowser. 
My application is extracting the main table, and displays it nicelly in a TreeView structure.
The HTML table has several rows, and the last cell has a "ng-click" which I need to click.
My TreeView already has a button, when the user clicks that button, I must click the corresponding "ng-click" and download detailed information about the product and display it.
 

The last cell information looks like this

(This is the last cell HTML code.)

I have no idea how to reach that "ng-click" fellow:

<a href="" class="btn btn-transparent" 
           ng-if="::thisProductInventory.availableBallast && thisProductInventory.isAvailable" 
           ng-class="{'btn-block':$root.mediaQueries['$res-phone-mid-landscape']()}" 
           ng-click="ProductInventory(thisProductInventory, $event)">

There's no Click, onClick or any other option which I'm familiar with. It appears to be some Angular stuff. Can shed some light?
I'm using DOM to navigate / extract data from the page. So ideally id would be perfect to reach something like "element.click()".
(I have no way to modify the javascript code. All I can do is "interact" through Delphi /Edge with the page.)

TIA

Edited by Clément

Share this post


Link to post

Just managed to do it in plain JavaScript!

 

I navigate to the corresponding row using DOM, found the <a> tag and called click..... So easy!

 

 

  • Like 1

Share this post


Link to post

JS is scary! Goes against everything that is safe and sound. I really can't say who ( or what) wrote that code. It be can be a person, a framework or ChatGPT. :classic_wacko:

They prefer to use a "Desktop application" to handle filtering and selection rather than modify the code. This should raise some red flags.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×