Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have to open a QlikView document with Python to do some automation, as long as I open it locally everything is ok ... but I would like to open it remotely so I use the call to open it remotely:
doc = q.OpenDoc ("qvp: // [user] @ [host] / [document]")
It open correctly but then puts me the screen for entering the password ... and therefore the automation cannot go on.
Is it possible to insert the password already in the opening link string of the document in some way so that will not asked?
Thanks, but it is not a section access but a domain one, as regards the automation on the server I have already done it and there are no problems, now instead I want to start it from the client ..... in each case I found a solution, and it is this:
from the Python program I launch the opening of Qlik, when I open the dialog where to type the password I launch the pywinauto library in order to automatically insert the pwd and click on the confirm button, I put the code here if it can be of help someone:
app = Application().connect(title='QlikView x64')
app = Application(backend="uia").connect(process=[PROCESSID])
app.window(best_match='PasswordDialog').print_control_identifiers()
top_level_main_window = app.window(title="QlikView x64")
top_level_main_window.wrapper_object()
nPDialog = top_level_main_window.child_window(title="Password", control_type="Window")
nPDialog.wrapper_object()
msg = nPDialog.child_window(class_name="Edit")
print(msg.legacy_properties()['Name'])
print(msg.is_editable())
msg.set_edit_text("*******")
msgB = nPDialog.child_window(class_name="Button",title="Conferma")
print(msgB.legacy_properties()['Name'])
msgB.click()
If the password-popup is related to a section access it should be possible but not for the authentication, see:
Solved: url with user and password - Qlik Community - 551793
Solved: QVP Syntax for passing an authentication - Qlik Community - 223700
An alternatively may be to access the applications directly with the desktop client with a file-share or probably much easier to do the automating already on the server-machine.
- Marcus
Thanks, but it is not a section access but a domain one, as regards the automation on the server I have already done it and there are no problems, now instead I want to start it from the client ..... in each case I found a solution, and it is this:
from the Python program I launch the opening of Qlik, when I open the dialog where to type the password I launch the pywinauto library in order to automatically insert the pwd and click on the confirm button, I put the code here if it can be of help someone:
app = Application().connect(title='QlikView x64')
app = Application(backend="uia").connect(process=[PROCESSID])
app.window(best_match='PasswordDialog').print_control_identifiers()
top_level_main_window = app.window(title="QlikView x64")
top_level_main_window.wrapper_object()
nPDialog = top_level_main_window.child_window(title="Password", control_type="Window")
nPDialog.wrapper_object()
msg = nPDialog.child_window(class_name="Edit")
print(msg.legacy_properties()['Name'])
print(msg.is_editable())
msg.set_edit_text("*******")
msgB = nPDialog.child_window(class_name="Button",title="Conferma")
print(msgB.legacy_properties()['Name'])
msgB.click()