VineGlobal / selenium-vba

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

ClickandWait Failed with PhantomJS #60

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I try to login using PhantomJS but it failed.
This code works with Firefox and Chrome.
Pls help me why?
Thanks

Dim obj, selenium, ret, title
on error resume next
set obj = CreateObject("SeleniumWrapper.Assembly")
If Err = 0 Then
    ret = obj.GetVersion()
    If Err = 0 Then
        on error goto 0
        Set selenium = CreateObject("SeleniumWrapper.WebDriver")
        selenium.Start "phantomjs", "https://www.kaskus.co.id/user/login"
        selenium.open "/"
        selenium.Type "username", "XXX"
        selenium.Type "password", "123456"
        selenium.clickAndWait "//input[@value='Login']"

        selenium.wait 500
        selenium.getScreenshot().Copy
        title = selenium.getTitle()
        wscript.echo "Page title was : " & title & vbCr & "A website screenshoot has been sent to the clipboard" 
        selenium.stop
    Else
        wscript.echo "Test failed !   " & vbCr & Err.Description
    End If
Else
    wscript.echo "Test failed !   " & vbCr & "Failed to create an object from SeleniumWrapper    " & vbCr & Err.Description 
End If

Original issue reported on code.google.com by ronnygo...@gmail.com on 15 Mar 2014 at 9:10

Attachments:

GoogleCodeExporter commented 9 years ago
What version of SeleniumWrapper and Operating system are you using?

Original comment by florentbr on 15 Mar 2014 at 11:01

GoogleCodeExporter commented 9 years ago
SeleniumWrapperSetup-1.0.17.0
and Windows XP

Original comment by ronnygo...@gmail.com on 16 Mar 2014 at 3:14

GoogleCodeExporter commented 9 years ago
I tried your script under XP with version 1.0.18.0 and I didn't get any error.
Do you also get the error with the latest version(1.0.18.0) ?

Original comment by florentbr on 17 Mar 2014 at 9:49

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 2 Apr 2014 at 5:01