Selenium

For Python:

Install:

pip install selenium

Example:


from Genlogin import Genlogin
import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service

gen = Genlogin("")
profileID = gen.getProfiles(0,1)["profiles"][0]["id"]
wsEndpoint = gen.runProfile(profileID)["wsEndpoint"].replace("ws://","").split('/')[0]

chrome_driver = 'chromedriver.exe'
chrome_options = Options()
chrome_options.add_experimental_option("debuggerAddress", wsEndpoint)

service = Service(executable_path=r'chromedriver.exe')
driver = webdriver.Chrome(service=service, options=chrome_options)
driver.get("https://genlogin.com")
time.sleep(5)
gen.stopProfile(profileID)

For C#:

Example:

 var gen = new Genlogin("");
 var profile = await gen.GetProfiles(1, 0);
 JObject jsonObject = JObject.Parse((string)profile);
 int profileID = (int)jsonObject["data"]["lst_profile"][0]["id"];
 var profileRun = await gen.runProfile(profileID);
 JObject jsonObjectprofileRun = JObject.Parse((string)profileRun);
 string wsEndpoint = ((string)jsonObjectprofileRun["wsEndpoint"]).Split('/')[2];
 var chromeDriverPath = "chromedriver.exe"; 
 var chromeOptions = new ChromeOptions();
 chromeOptions.DebuggerAddress = wsEndpoint;
 var service = ChromeDriverService.CreateDefaultService(chromeDriverPath);
 var driver = new ChromeDriver(service, chromeOptions);

 driver.Navigate().GoToUrl("https://genlogin.com");

 gen.stopProfile(profileID);

 driver.Quit();

Last updated