const { Builder, By, Key } = require("selenium-webdriver");
require('chromedriver');

async function searchTest() {

    let driver = await new Builder().forBrowser('chrome').build();

    // 
    await driver.get("https://mialala.vn/")


    // nhap text tìm kiếm
    var text_search = 'Đồ ngủ';

    await driver.findElement(By.id("js-global-seach")).sendKeys(text_search, Key.RETURN);



    setInterval(() => {
        driver.close()
    }, 2000);

}
searchTest()