I have to check if data inserted in the web element is right or not, how can i do it using selenium-webdriver in javascript.
I want result of one of the function that i wrote somewhere else, how to get it. (This function is fetching some data from web using axios)
Test.js
const assert = require('assert');
const { Builder, WebDriver } = require('selenium-webdriver');
const { someFunction } = require('../react/services/someFunction');
ApiService.js
export async function someFunction(pid, val) {
const response = await axiosInstance.put(
`/${pid}`,
val
);
return response.data;
}
Error:
import axios from 'axios';
^^^^^^
SyntaxError: Cannot use import statement outside a module