Skip to content
Snippets Groups Projects
findDegreeCourseApplicationID.js 335 B
Newer Older
Orlando Piñero's avatar
Orlando Piñero committed
const { By } = require('selenium-webdriver');

module.exports = async function (driver) {
    const degreeCourses = await driver.findElements(By.className('card'));
    const lastOne = await degreeCourses.pop();
    const itemAndID = await lastOne.getAttribute("id")
    
    return itemAndID.split("DegreeCourseApplicationItem")[1]
 }