Created
April 28, 2023 16:38
setting up Selenium in the Express framework
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const { By, Builder, Select } = require("selenium-webdriver"); | |
const app = express(); | |
const port = 3002; | |
let driver; | |
const URL = "https://jqueryui.com/datepicker/#date-range"; | |
const expected_fr_date = "20"; | |
const expected_to_date = "26"; | |
app.get("/", async (request, response) => { | |
try { | |
const data = await DatePickerWithLambdaTest(); | |
response.status(200).json(data); | |
} catch (error) { | |
console.log(error); | |
response.status(500).json({ | |
message: "Server error occurred", | |
}); | |
} | |
}); | |
app.listen(port, () => { | |
console.log(`Example app listening at http://localhost:${port}`); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment