java-client icon indicating copy to clipboard operation
java-client copied to clipboard

APPIUM IOS JAVA unable to find webcontext while appium inspector can

Open krishtoautomate opened this issue 2 years ago • 1 comments

Description

Launched native app, activated safari and switch-to-web-context is not working using java-client while same scenario is working in appium inspector

Environment

  • Java client build version: 8.3.0
  • Appium version: 2.0.0-beta.55
  • Mobile platform: ios
  • Real device

Details

Please provide more details, if necessary.

Code To Reproduce Issue [ Good To Have ]

    ((IOSDriver)driver).activateApp("com.apple.mobilesafari");

    sleep(5);

    Set<String> contextNames = ((SupportsContextSwitching) driver).getContextHandles();//tried IOSDriver also

    System.out.println("contextNames : "+ contextNames);

    sleep(10);

    contextNames = ((SupportsContextSwitching) driver).getContextHandles();

    System.out.println("contextNames : "+ contextNames);

    sleep(10);

    contextNames = ((SupportsContextSwitching) driver).getContextHandles();

    System.out.println("contextNames : "+ contextNames);

krishtoautomate avatar Mar 29 '23 02:03 krishtoautomate

Safari set default to private mode

krishtoautomate avatar Mar 29 '23 03:03 krishtoautomate