|
From: Ahmed A. <asa...@ya...> - 2017-03-01 07:24:42
|
Hi,
@JsxSetter is meant to be called from JavaScript.
However, you can use the internal API, by something like:
HtmlPage page = webClient.getPage(some_url); HTMLDocument document = (HTMLDocument) page.getScriptableObject(); Screen screen = document.getWindow().getScreen(); screen.setWidth(1234);
Hope that helps,Ahmed
From: webb <d8...@si...>
To: htmlunit-user <htm...@li...>
Sent: Wednesday, March 1, 2017 3:26 AM
Subject: [Htmlunit-user] how can I use JsxSetter?
Dear Sir,
I have some questions, the screen.java in Htmlunit, the value of Height is 768,
the value of Width is 1024, but wo want to change it when the WebClient creating,
I want to set some parameters of the screen, what should I do?
I'm looking forward to your reply soon.
Sincerely yours,
webb |