sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #09103
Re: [Question #189203]: Input password : Is there an hidden input method ?
Question #189203 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/189203
Sephyroth69 posted a new comment:
Yes yes, I know java ;) I realised the link afterward.
Here is my working piece for anyone looking for that :
import java.awt.GridLayout as GridLayout
from javax.swing import JOptionPane, JPanel, JLabel, JPasswordField, JTextField
from java.lang import String, Object
from jarray import array
panel = JPanel()
panel.setLayout(GridLayout(2,2))
loginLabel = JLabel("Login : ")
loginField = JTextField()
pwdLabel = JLabel("Password : ")
passwordField = JPasswordField()
panel.add(loginLabel)
panel.add(loginField)
panel.add(pwdLabel)
panel.add(passwordField)
fields = array([panel], Object)
action = JOptionPane.showConfirmDialog(None, fields, "Enter Login and Password", JOptionPane.OK_CANCEL_OPTION)
while (action < 0):
action = JOptionPane.showConfirmDialog(None, fields, "Enter Login and Password", JOptionPane.OK_CANCEL_OPTION)
loginValue = String(loginField.getText())
passwordValue = String(passwordField.getPassword())
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.