0

nullポインタ例外が発生する理由を誰か説明してください

HtmlPage page = null;
boolean savePagesLocally = false;
String url = "http://example.com";

WebClient webClient = new WebClient(BrowserVersion.FIREFOX_3_6);
webClient.setThrowExceptionOnScriptError(false);
try
{
    page = webClient.getPage( url );

    HtmlRadioButtonInput radioButton2 = (HtmlRadioButtonInput) page.getElementById("ctl00_phContent_ucUnifiedSearch_rdoIndvl");
    radioButton2.click();

    HtmlTextInput textField3 = (HtmlTextInput) page.getElementById("ctl00_phContent_ucUnifiedSearch_txtIndvl");
    textField3.setValueAttribute("1061726"); // null pointer occurs here!
4

1 に答える 1