Selenium python code quits the webpage after execution

Advertisements Selenium code quits the webpage page after executing, although I added the line "driver.quit()" and it quits after loading the webpage. Note: The browser is Microsoft Edge from selenium import webdriver from selenium.webdriver.common.by import By driver = webdriver.Edge() driver.get("https://www.youtube.com/?app") driver.set_window_size(1285, 824) driver.quit() >Solution : The driver.quit() method is used to close the entire browser… Read More Selenium python code quits the webpage after execution

How toextract the number from the parent div excluding the text of the child using Selenium IDE

Advertisements I’m trying to fetch the number out the Steam site -> https://store.steampowered.com/about/ Element snapshot: Code trials: await driver.findElement(By.xpath("//div[@class=’online_stats’]//div[2][@class=’online_stat’]")).getText().then((text)=>{ onlinePlayersInGames = text; }); Doing it with this code results in me getting a returned value of: ONLINE 22,099,967 Rather than only fetching the number. >Solution : To extract the data for playing now: await driver.findElement(By.xpath("//div[@class=’online_stat’][./div[@class=’online_stat_label… Read More How toextract the number from the parent div excluding the text of the child using Selenium IDE