Winium.Desktop icon indicating copy to clipboard operation
Winium.Desktop copied to clipboard

'Element not available' error occurs after clicking on the expected element.

Open ghost opened this issue 4 years ago • 1 comments

Hi,

I have a desktop application that has a login screen with two buttons (Sign In and Change Password). After entering the username and password, while performing click operation on 'Sign In' button, the button is clicked, but after that 'Element not available' error occurs.

Scenario:

  1. After clicking on 'Sign In' button, immediately a popup message will be displayed on top of the 'Sign In' button, at that time 'Sign In' button will not be visible, in this scenario I am getting the error 'Element not available', but the expected click operation is completed, still am getting the issue.

  2. There is another button named 'Change Password', while performing the same click operation on this button, I didn't get any error, because after clicking that button login screen window will be expanded and 'Change Password' button is still visible.

Could anyone please suggest how to resolve this issue?

Error: 2020-01-17 17:09:19,027 DEBUG [Winium.Desktop.Driver.Listener]: Waiting for a connection... 2020-01-17 17:09:19,530 DEBUG [Winium.Desktop.Driver.Listener]: ACCEPTED REQUEST POST /session/AwesomeSession/element/2425650-3/click HTTP/1.1 2020-01-17 17:09:19,530 INFO [Winium.Desktop.Driver.Listener]: COMMAND clickElement { "id": "2425650-3", "SESSIONID": "AwesomeSession", "ID": "2425650-3" } 2020-01-17 17:09:59,599 DEBUG [Winium.Desktop.Driver.Listener]: RESPONSE: OK: { "sessionId": "AwesomeSession", "status": 13, "value": { "error": "unknown error", "stacktrace": " at System.Windows.Automation.InvokePattern.Invoke()\r\n at Winium.Cruciatus.CruciatusCommand.TryClickUsingInvokePattern(CruciatusElement element, Boolean doubleClick)\r\n at Winium.Cruciatus.Elements.CruciatusElement.Click(MouseButton button, ClickStrategies strategy, Boolean doubleClick)\r\n at Winium.Cruciatus.Elements.CruciatusElement.Click()\r\n at Winium.Desktop.Driver.CommandExecutors.ClickElementExecutor.DoImpl()\r\n at Winium.Desktop.Driver.CommandExecutors.CommandExecutorBase.Do()", "message": "Element not available" } } 2020-01-17 17:09:59,599 DEBUG [Winium.Desktop.Driver.Listener]: Client closed

2020-01-17 17:09:59,599 DEBUG [Winium.Desktop.Driver.Listener]: Waiting for a connection... Exception in thread "main" org.openqa.selenium.WebDriverException: Element not available (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 0 milliseconds Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'

Thanks.

ghost avatar Jan 18 '20 04:01 ghost

After clicking the signin button, please capture the popup message using textblock and continue click OK button from popup and proceed. If you could share the exact lines of codes it will be helpful to provide better suggestions.

nananand7 avatar Jan 30 '20 08:01 nananand7