8000 self.driver.window_handles returns the list randomly · Issue #1076 · appium/python-client · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
self.driver.window_handles returns the list randomly #1076
Open
@ammaramja

Description

@ammaramja

The problem

self.driver.window_handles returns the list randomly, earlier the latest window handle used to be max from the list, now its neither max nor latest element of the array i.e -1 so there is no concrete way to switch to the latest window.

Environment

  • Appium version: 2.13.1
  • Last Appium version that did not exhibit the issue (if applicable): 1.65
  • Desktop OS/version used to run Appium:
  • Node.js version (unless using Appium.app|exe): v18.19.1
  • Mobile platform/version under test: Samsung S23 FE
  • Real device or emulator/simulator:
  • Appium CLI or Appium.app|exe:

Link to Appium Logs

appium_server_logs_11-27-37.log

Create a GIST which is a paste of your full Appium logs, and link them here.

Code To reproduce issue

        ```
        self.appium_opr.switch_context(self.instance, "web")
        time.sleep(CONTEXT_WAIT)
        all_windows = self.instance.window_handles
        window_after = max(all_windows)
        self.instance.switch_to.window(window_after)
        url = self.instance.current_url

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0