self.driver.window_handles returns the list randomly
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start with the reproduction code in the issue and inspect the linked Appium server log, focusing on the values returned by self.instance.window_handles after switching to the web context. Compare the observed ordering with the behavior from the earlier Appium version; done means the ordering issue or a concrete supported way to select the latest window is identified.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 570
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 24
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from appium/python-client
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
appium/python-client#1230 · 1 comment ·
Maintainers usually reply within 3 days
-
question
Difficulty 4/5 3-5 days Newbie friendliness 25/100
appium/python-client#1168 · 9 comments ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 55/100
appium/python-client#1147 · 7 comments ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 38/100
appium/python-client#1091 · 4 comments ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
appium/python-client#980 · 7 comments ·
Maintainers usually reply within 3 days
All issues in appium/python-client
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
solana-foundation/pay-kit#341 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nasa/python_cmr#123 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
EleutherAI/lm-evaluation-harness#4243 ·
Maintainers usually reply within 1 day
-
area: dashboard bug perceived difficulty: 3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Nitjsefnie-Harness-Commons/daedalus#1179 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
cusp-ai-oss/tojax#17 ·