Hi,
You can use JavaScript to find that link and click it, or you can do what's described here :
https://www.briskbard.com/forum/viewtopic.php?f=8&t=112
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.
Programatically click on a link ?
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
- salvadordf
- Posts: 4565
- Joined: Thu Feb 02, 2017 12:24 pm
- Location: Spain
- Contact:
Re: Programatically click on a link ?
After a quick google search I found this :
Simulating a click :
https://stackoverflow.com/questions/145 ... javascript
https://stackoverflow.com/questions/242 ... tically-js
https://stackoverflow.com/questions/175 ... ipt-jquery
https://stackoverflow.com/questions/902 ... javascript
Searching an element by any attribute :
https://stackoverflow.com/questions/269 ... bute-value
Simulating a click :
https://stackoverflow.com/questions/145 ... javascript
https://stackoverflow.com/questions/242 ... tically-js
https://stackoverflow.com/questions/175 ... ipt-jquery
https://stackoverflow.com/questions/902 ... javascript
Searching an element by any attribute :
https://stackoverflow.com/questions/269 ... bute-value
Re: Programatically click on a link ?
другой example:
introduce JS in html page after load
delphi code:
introduce JS in html page after load
Code: Select all
var links = document.querySelectorAll('a.link-ajax.j-v-contacts-expand-link');
if (links) {
for (var x = 0; x <= links.length; x++) {
if (links[x]) {
if (links[x].innerHTML.trim().indexOf('text on caption') != -1) {
links[x].click();
}
}
}
}
Code: Select all
s := js_code;
Chromium1.Browser.MainFrame.ExecuteJavaScript(s, Chromium1.Browser.MainFrame.Url, 0);