question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

not able to click a button

See original GitHub issue

Hi All,

I am trying to automate windows based application which contains spaces in the application name. I am able to open app with the help of below code:

from pywinauto.application import Application
app=Application().start('c:\\program files\\ESPWorkstation.exe')

we will receive a popup window (below) which allows us to proceed further popup

now i need to click on load button to proceed further.

Can some one help me on this issue?

Also, I need to navigate to a window which contains spaces after clicking load button to proceed with.

Thanks, rajarameshmamidi

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:38 (16 by maintainers)

github_iconTop GitHub Comments

2reactions
mallikarjunasai995commented, Oct 24, 2019

Hi Folks Even i am trying to do similar thing … i just opened my app which needs to be automated. Hope i have clearly mentioned now what am trying to in the below code as a comment

https://stackoverflow.com/questions/24606219/how-to-perform-click-action-on-button-or-text-field-by-pywinauto As answered in the above stackoverflow question, was not able to execute succesfully by mentioned two level hirearchies to perform the desired UI automation

image

from pywinauto import Desktop, Application
import time
import pyautogui
Application().start('explorer.exe "C:\\Users\\tm\\Desktop\\new vantage\\PCMark_Vantage_v120_installer.exe"')
#started and connected app
app = Application(backend="uia").connect(path="explorer.exe", title="PCMark Vantage - InstallShield Wizard")
dlg = app.window(title_re='PCMark Vantage - InstallShield Wizard', class_name = '#32770')
'''
now after the above step , i opened the app ... now in the mentioned screenshot i want to click either  Next> or cancel button which was not able to get the control in that particular dialogue window . Need help on how to perform click action on either of those buttons
'''
app.??????.Cancel.click()
#dlg.child_window(best_match='Next').click()
print(dlg)
2reactions
vasily-v-ryabovcommented, Sep 3, 2018

Hi @rajarameshmamidi this is easy to use spaces with key access instead of attribute access:

app['Load the User Profile'].LoadButton.click_input()

Anyway the name like app.Load_the_User_Profile should work since the best_match algorithm is resistant to typos. This is approximate matching of the name.

For more details I’d recommend to learn the Getting Started Guide first before submitting so many questions. If some paragraph is unclear in the guide, it’s a good reason to submit an issue.

Thanks for understanding.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot click button in HTML? - javascript - Stack Overflow
I have a button and there is a problem with it: it can be seen but it cannot be clicked. I tried changing...
Read more >
I can not open start button by clicking on it nor can I get to my
1. Press Ctrl + Alt + Del keys and select Task manager. · 2. Select "Windows Explorer" on the list. · 3. Click...
Read more >
How to Fix the Left Click Mouse Button Not Working on ...
Right-click on the Start Menu and then choose Device Manager. · Next, use your keyboard arrows to scroll down to Mice and other...
Read more >
BOT is not able to click on button as windows task bar is ...
BOT is not able to click on button as windows task bar is hiding some control. ... Try flag SimulateClick property to True....
Read more >
How to Fix Mouse Right-click Button Not Working in Windows ...
How to fix the mouse right- click button not working on Windows 10 PC? Is your mouse right- click ... Your browser can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found