I need to connect MATLAB to a webpage then get some data, fill some text in webpage and run some java scripts (e.g. pushing a button). Based on answer in Running a JavaScript command from MATLAB to fetch a PDF file, I can open a page and run a script but I can not find elements handle (e.g. a text field) in "webbrowser object" to get data and changes their values.
Thank you.
For example:
url='www.web.com';
% Open web page
import com.mathworks.mde.desk.*;
wb=com.mathworks.mde.webbrowser.WebBrowser.createBrowser;
wb.setCurrentLocation(url);
% Here I should enter some text in a field.
% I have the field name from inspect element window,
% But I can not find its handle reference to change its value.
% Execute script
wb.executeScript('javascript:__doPostBack("ctl00$ContentPlaceHolder1$btn_find","")')