appium / appium-for-mac

[deprecated] Application for automating a mac app with JSON wire protocol
Apache License 2.0
193 stars 70 forks source link

Issue with entering password for Installation process #42

Open Swetha-ch opened 6 years ago

Swetha-ch commented 6 years ago

Hi,

We are trying to automate Installation of our package and but failing to enter password when prompted for:

There is an exception when trying call driver.get("SecurityAgent) driver.get("SecurityAgent") File "/Library/Python/2.7/site-packages/selenium-3.9.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 324, in get self.execute(Command.GET, {'url': url}) File "/Library/Python/2.7/site-packages/selenium-3.9.0-py2.7.egg/selenium/webdriver/remote/webdriver.py", line 312, in execute self.error_handler.check_response(response) File "/Library/Python/2.7/site-packages/selenium-3.9.0-py2.7.egg/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: An unknown server-side error occurred while processing the command.

Without calling get for SecurityAgent, When trying to find element using XPath for password field it fails get the element with error:Exception in getting the element by xpath : Message: An element could not be located on the page using the given search parameters.

Can AppiumForMac find elements from a process i.e. the password alert is from a process "SecurityAgent" which is not an app with Dock item and Main menu bar.

akamat4477 commented 6 years ago

What is macOS version? It works on 10.12.6 with :xpath:"/AXApplication[@AXTitle='SecurityAgent']/AXWindow/AXTextField[@AXValue='']"

Swetha-ch commented 6 years ago

on Mac OS 10.13.x

daveenguyen commented 5 years ago

Looks like the same issue as pyatom/pyatom#156 Security Agent elements are not visible until the title bar is clicked.

I'll get selenium.common.exceptions.NoSuchElementException: Message: An element could not be located on the page using the given search parameters. unless I've manually clicked on the title bar.

QITIE commented 4 years ago

Is there any solution for this issue ?

Or use some hotkeys event to instead manual click.