Skip to content

The default element-wait retry do not override when trying to update from code #112

@dipakkumar1225

Description

@dipakkumar1225

The default element-wait retry do not override when I am trying to update from code:

{
  "server": {
    "plugin": {
      "element-wait": {
        "timeout": 50000,
        "intervalBetweenAttempts": 150,
        "excludeEnabledCheck": ["click"]
      }
    }
  }
}
private static AppiumDriverLocalService getAppiumDriverService() {
        return AppiumDriverLocalService.buildService(new AppiumServiceBuilder()
                .withIPAddress("127.0.0.1")
                .usingPort(4723)
                .withArgument(GeneralServerFlag.BASEPATH, "/wd/hub")
                .withArgument(GeneralServerFlag.LOG_LEVEL, "info:debug")
                .withArgument(GeneralServerFlag.USE_DRIVERS, "UiAutomator2")
                .withArgument(GeneralServerFlag.ALLOW_INSECURE, "adb_shell")
                .withArgument(GeneralServerFlag.RELAXED_SECURITY)
                .withArgument(GeneralServerFlag.USE_PLUGINS, "element-wait, gestures, appium-dashboard")
                .withArgument(GeneralServerFlag.SESSION_OVERRIDE)
                .withTimeout(Duration.ofSeconds(180))
                .withArgument(GeneralServerFlag.CONFIGURATION_FILE, new File("config" + File.separator + "serverconfig.json").toString())
                .withArgument(GeneralServerFlag.SHOW_CONFIG)
                .withLogFile(new File(System.getProperty("user.dir") + File.separator + "Logs" + File.separator + Thread.currentThread().getId())));
    }
    
```

{
address: '0.0.0.0',
allowCors: false,
basePath: '',
callbackPort: 4723,
debugLogSpacing: false,
keepAliveTimeout: 600,
localTimezone: false,
loglevel: 'debug',
logNoColors: false,
logTimestamp: false,
longStacktrace: false,
noPermsCheck: false,
port: 4723,
relaxedSecurityEnabled: false,
sessionOverride: false,
strictCaps: false
}

(no configuration file loaded)

via CLI or function call:

{
address: '127.0.0.1',
allowInsecure: [ 'adb_shell' ],
basePath: '/wd/hub/',
loglevel: 'info:debug',
relaxedSecurityEnabled: true,
sessionOverride: true,
useDrivers: [ 'UiAutomator2' ],
usePlugins: [ 'element-wait', 'gestures', 'appium-dashboard' ]
}

final configuration:

{
address: '127.0.0.1',
allowInsecure: [ 'adb_shell' ],
basePath: '/wd/hub/',
logFile: 'D:\Automation-Framework\Generic\Logs\1',
loglevel: 'info:debug',
nodeconfig: { server: { plugin: [Object] } },
port: 4723,
relaxedSecurityEnabled: true,
sessionOverride: true,
useDrivers: [ 'UiAutomator2' ],
usePlugins: [ 'element-wait', 'gestures', 'appium-dashboard' ],
showConfig: true,
allowCors: false,
callbackPort: 4723,
debugLogSpacing: false,
keepAliveTimeout: 600,
localTimezone: false,
logNoColors: false,
logTimestamp: false,
longStacktrace: false,
noPermsCheck: false,
strictCaps: false
}


from CLI it is working properly
appium --base-path="/wd/hub/" --allow-insecure="adb_shell" --relaxed-security --session-override --use-drivers="UiAutomator2" --use-plugins="images, element-wait, appium-dashboard" --config "%cd%\config\serverconfig.json"


Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions