HI,
At first, thanks for your work.
I have two questions
1.- It's posible to execute Selenium Chromedrive without installing it (loading dll or registred or similar)?
2.- I got one error message about disabling the extensions when using chrome selenium. How do i set chrome startup parameters? (v.g. --disable-extensions)
TIA.
Autohotkey & Selenium Chrome
Re: Autohotkey & Selenium Chrome
Autoresponse
1.- Sorry not advance
2.-
At this sample:
- run no default google, v.g. Chrome portable
- Use profile for save sessions
- disable extensions and especifics protocols.
Another 2c for you:
1.- Get all options from selec tag
2.- Click (select) desired select tag option: ("ROBOT" its the option)
3.- Select windows default chrome profile (current user)
1.- Sorry not advance
2.-
Code: Select all
url;="http:\\google.com"
driver:= ComObjCreate("Selenium.WebDriver")
driver.AddArgument("--no-sandbox")
driver.AddArgument("--disable-extensions")
driver.AddArgument("--disable-quic")
driver.AddArgument("--use-spdy=off")
driver.setBinary("C:\Datos\RPA\EXTERNO\GoogleChromePortable 62_032\GoogleChromePortable.exe")
driver.SetProfile("C:\Datos\RPA\EXTERNO\GoogleChromePortable 62_032\Data\profile\Default")
driver.Start("chrome", url)
driver.Get("/")
- run no default google, v.g. Chrome portable
- Use profile for save sessions
- disable extensions and especifics protocols.
Another 2c for you:
1.- Get all options from selec tag
Code: Select all
elementos := driver.findElementbyXPath("//*[@id='PDQToolbar']/div[2]/select")
i := elementos.Attribute("length")
c := ""
Loop %i%
{
t := driver.findElementbyXPath("//*[@id='PDQToolbar']/div[2]/select/option[" . A_Index . "]").Attribute("innerText")
c := c t "`n"
}
msgbox %c%
Code: Select all
i := driver.findElementbyXPath("//*[@id='PDQToolbar']/div[2]/select").Attribute("length")
Loop %i%
{
elem := driver.findElementbyXPath("//*[@id='PDQToolbar']/div[2]/select/option[" . A_Index . "]")
t := elem.Attribute("innerText")
if(t="ROBOT")
{
elem.click()
break
}
}
3.- Select windows default chrome profile (current user)
Code: Select all
usu = %username%
driver.SetProfile("C:\Users\" . usu . "\AppData\Local\Google\Chrome\User")
Who is online
Users browsing this forum: Google [Bot], mikeyww, Pan Blazej, tigredappart and 184 guests