attributeName = "string_scalar_rw";
initFirstDevice();
// create widget
jf1 = new JFrame();
final AttributeScalarFileBrowserButton widget = new AttributeScalarFileBrowserButton.Builder(
m_deviceName, attributeName).confirmation(true).jframe(jf1)
.build();
Sleeper.SECONDS.sleep(2);
// select the file
final String fich = enterFilePath(jf1);
if (withCancel) { // test refuse confirmation
final JDialog fd = tth.findDialog("Confirmation");
tth.rejectDialog(fd);
// assert device and bean values are not changed
Assert.assertFalse("reject confirmation failed", m_deviceProxy
.read_attribute(attributeName).extractString().equals(fich)
&& fich.equals(getButton(jf1).getText()));
} else {// test acceptConfirmation
validateConfirmation("");
// check device is updated
Sleeper.SECONDS.sleep(2);
Assert.assertTrue("label of bean is not same that attribute",
m_deviceProxy.read_attribute(attributeName).extractString()
.equals(getButton(jf1).getText()));
}
// clean
widget.stop();
jf1.dispose();
}