How to programmatically click a webpage button in Java?
Given this button:
<div id="titlebutton" >Button</div>
In Javascript it would work like this:
var newWin = window.open(siteYouHaveAccessTo);
newWin.document.getElementById('titlebutton').click();
I was wondering how I would do this in Java, not Javascript (Is there a way of doing it with Java alone or do I have to import/use Javascript?).
Edit:
Clicking the Button will result in a call of a function called setText().
I am not sure how I would send a similar request as this function?
Would it help if I pasted the function code?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…