nakaimasaki / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
0 stars 0 forks source link

I would like to run in Secret mode. #160

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Operating system : Windows7
.Net Framework version :?
Office Version :2007
SeleniumWrapper version :Last

What is your issue ?

I do not know the English language.
I have a question difficult .
The use of chromium translator .

I would like to run in Secret mode.
err is: ".switchToWindow hWnds (1)"

Examples:

Option Explicit
'Dim drvutil As New SeleniumWrapper.drvutil
Dim driver As New SeleniumWrapper.WebDriver
Dim drvkey As New SeleniumWrapper.Keys

Sub 하나를하더라도최선을()
    Dim hWnds As Variant
    Dim IE As Object
    Set IE = CreateObject("SeleniumWrapper.WebDriver")
    Set Keys = CreateObject("SeleniumWrapper.Keys")
    With IE
        .addArgument "--user-agent=Mozilla/4.0 (Linux; U; Android 2.1-update1; ko-kr; Nexus One Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"
        .Start "chrome", "http://m.naver.com"  '// firefox, chrome, ie, ie64, safari
        SendKeys "^+n"    '// 시크릿 모드(Secret Mod)

'    features = 
"""width=400,height=500,scrollbars=yes,resizable=yes,top=500,left=500,toolbar=ye
s"""
'    .executeScript "window.open('http://m.naver.com','_blank'," & features & 
");"

    hWnds = .WindowHandles
    Debug.Print .WindowHandle
    .switchToWindow hWnds(1)
'    .stop

    End With
End Sub

Help.

Original issue reported on code.google.com by heesung2...@gmail.com on 30 Jun 2015 at 2:19

Attachments:

GoogleCodeExporter commented 8 years ago
The use of chrome translator .

Original comment by heesung2...@gmail.com on 30 Jun 2015 at 2:51

GoogleCodeExporter commented 8 years ago
It seems to be a timing issue.
The new version can implicitly wait for the new window to appear:
driver.SwitchToNextWindow
http://florentbr.github.io/SeleniumBasic

Original comment by florentbr on 21 Jul 2015 at 6:55