I am working on a home project to automate a task so I can improve my time management.
I am using a web browser control and need to automate the process of clicking a javascript button. I have tried to click the button by it's value but it is not working and I cannot click the button by it's ID also.
This is the code of the webpage button I need my software to automatically click:
Note that the random looking numbers and letters within the parentheses in the "onclick" part of the code changes every time the page reloads.Code:<a href="javascript:void(0);" onclick="viewvideo(7656,'ZYPbX7dNaPw');">Next</a>
I have already searched in these forums and found a thread regarding this same issue but still not able to get it working.
I have tried messing with this code I found on another thread, but with no luck:
I have been researching this issue for months now on and off when I had the time and am coming to a loss now.Code:WebBrowser1.Document.All("Submit").RaiseEvent("onclick")
Any help is very greatly appreciated.
Thanks in advance,
David.




Reply With Quote
