`this is my javascript code. i want run it in web with appium . what should i do?
does appium flutter support web output?
const { remote } = require(‘webdriverio’);
const { byValueKey } = require(‘appium-flutter-finder’);
(async () => {
const browser = await remote({
logLevel: ‘debug’,
port: 4723,
capabilities: {
‘appium:platformName’: ‘Windows’,
‘browserName’: ‘Chrome’,
‘appium:app’:’C:Usersparisa.asghariAndroidStudioProjectsappium_projectwebindex.html’,
‘appium:automationName’: ‘Chromium’,
},
});
const buttonFinder = byValueKey('Nbuttomn');
await driver.elementClick(buttonFinder);
await driver.elementClick(buttonFinder);
await driver.elementClick(buttonFinder);
await driver.elementClick(buttonFinder);
await driver.elementClick(buttonFinder);
const counterTextFinder = byValueKey('CounterText');
const counterText = await driver.getElementText(counterTextFinder); // Get the counter's text
if (counterText === '5') {
console.log('PASS: Counter value is correct.');
} else {
console.log(`FAIL: Expected counter to be 5 but got ${counterText}`);
}
await driver.pause(1000);
})();
this is my cmd output
your text
2024-08-20T06:53:43.042Z DEBUG webdriver: request failed due to response error: unknown error
2024-08-20T06:53:43.042Z ERROR webdriver: Request failed with status 500 due to unknown error: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘flutter’ and platformName ‘Windows’. Have you installed a driver that your text
supports those capabilities? Run ‘appium driver list –installed’ to see. (Lower-level error: Driver ‘flutter’ supports automationName ‘Flutter’, but Appium could not find support for platformName ‘Windows’. Supported platformNames are: [“iOS”,”Android”])
2024-08-20T06:53:43.044Z ERROR webdriver: unknown error: An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘flutter’ and platformName ‘Windows’. Have you installed a driver that supports those capabilities? Run ‘appium driver list –installed’ to see. (Lower-level error: Driver ‘flutter’ supports automationName ‘Flutter’, but Appium could not find support for platformName ‘Windows’. Supported platformNames are: [“iOS”,”Android”])
at getErrorFromResponseBody (file:///C:/appium-js/node_modules/webdriver/build/index.js:996:10)
at FetchRequest._request (file:///C:/appium-js/node_modules/webdriver/build/index.js:1304:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async startWebDriverSession (file:///C:/appium-js/node_modules/webdriver/build/index.js:906:16)
at async _WebDriver.newSession (file:///C:/appium-js/node_modules/webdriver/build/index.js:1502:41)
at async remote (file:///C:/appium-js/node_modules/webdriverio/build/index.js:6964:20)
at async C:appium-jstest.js:6:21
file:///C:/appium-js/node_modules/webdriver/build/index.js:910
throw new Error(“Failed to create sessioyour text
n.n” + message);
^your text
Error: Failed to create session.
An unknown server-side error occurred while processing the command. Original error: Could not find a driver for automationName ‘flutter’ and platformName ‘Windows’. Have you installed a driver that supports those capabilities? Run ‘appium driver list –installed’ to see. (Lower-level error: Driver ‘flutter’ supports automationName ‘Flutter’, but Appium could not find support for platformName ‘Windows’. Supported platformNames are: [“iOS”,”Android”])
at startWebDriverSession (file:///C:/appium-js/node_modules/webdriver/build/index.js:910:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async _WebDriver.newSession (file:///C:/appium-js/node_modules/webdriver/build/index.js:1502:41)
at async remote (file:///C:/appium-js/node_modules/webdriverio/build/index.js:6964:20)
at async C:appium-jstest.js:6:21`