my script:
driver := ComObjCreate("Selenium.FirefoxDriver")
driver.Get("https www.google.com.hk /") Broken Link for safety
i:= 1
pic := driver.TakeScreenshot(800)
pic.SaveAs(".\%i%.jpg")
can anyone help me how to printscreen pictrue with var name??? like 1.jpg
seleniumbasic with ahk screenshot
-
- Posts: 26
- Joined: 23 Dec 2018, 00:40
Re: seleniumbasic with ahk screenshot
Assuming that you have everything else correct.
Code: Select all
pic.SaveAs(".\" i ".jpg")
Re: seleniumbasic with ahk screenshot
for reference, Hellbent is using "auto concatenation" which is just putting a space between the strings and variable names. to be more explicit, you could use the . concatenation operator to make it more clear.
all of these are equivalent:
gets kind of hard to see with all the dots in your string
see here:
https://www.autohotkey.com/docs/Variables.htm
AHKv2 was going to allow %% derefs within quoted strings, which would have allowed the code in the first post, but it was removed unfortunately.
all of these are equivalent:
Code: Select all
string := ".\" i ".jpg"
string2 := ".\" . i . ".jpg"
string3 = .\%i%.jpg
Code: Select all
string := "Hello " name " how are you doing?"
string2 := "Hello " . name . " how are you doing?"
string3 = Hello %name% how are you doing?
https://www.autohotkey.com/docs/Variables.htm
AHKv2 was going to allow %% derefs within quoted strings, which would have allowed the code in the first post, but it was removed unfortunately.
-
- Posts: 26
- Joined: 23 Dec 2018, 00:40
Re: seleniumbasic with ahk screenshot
thanks all it's work
Re: seleniumbasic with ahk screenshot
Hi, I'm wondering which version of browser you're using with Firefoxdriver. My code "driver.Get" can't jump to the page.
-
- Posts: 26
- Joined: 23 Dec 2018, 00:40
Re: seleniumbasic with ahk screenshot
i not sure but maybe is firefox38
as
https florentbr.github.io /SeleniumBasic/ Broken Link for safety
Tested environments
Windows 8.1 / Excel 2010 32-bit / Firefox 39 / Selenium IDE 2.9.0
Windows 7 / Excel 2010 32-bit / Firefox 39 / Selenium IDE 2.9.0
Windows XP / Excel 2003 / Firefox 39 / Selenium IDE 2.9.0
as
https florentbr.github.io /SeleniumBasic/ Broken Link for safety
Tested environments
Windows 8.1 / Excel 2010 32-bit / Firefox 39 / Selenium IDE 2.9.0
Windows 7 / Excel 2010 32-bit / Firefox 39 / Selenium IDE 2.9.0
Windows XP / Excel 2003 / Firefox 39 / Selenium IDE 2.9.0