Reputation: 11
I've been trying to use Selenium in my VBA to set a new position and size to the chrome to make it "inviseble" while I'm updating my reports.
bot.Start "chrome"
bot.Window.SetPosition ("X as Long, Y as long") 'It requires a "="
bot.Window.Setsize(200,200) 'It requires a "="
I've tried different forms and googled a lot, but I didn't find a good tutorial for Selenium' VBA commands
Upvotes: 1
Views: 3997
Reputation: 1
Just remove the brackets like this:
bot.Window.SetPosition X, Y
bot.Window.Setsize 200, 200
Upvotes: 0
Reputation: 11
I got what i wanted
bot.Start "chrome", weburl
iEsq = GetSystemMetrics(SM_CXSCREEN)
bot.Window.SetPosition iEsq - 1, 0
Upvotes: 0
Reputation: 21
I think there's probably an error in the definition of the function, but you can use this alternate function call notation and it will work:
bot.Window.SetSize 200, 200
Not my solution...I had the same problem. Found the solution here: https://github.com/florentbr/SeleniumBasic/issues/58
You could also submit a bug there if you think it's worthwhile to get it fixed.
Upvotes: 2