blueprintmrk / selenium-vba

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

unable to leave window up with links clickable #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system and version (32/64bit) : Microsoft Windows xp
.Net Framework version :1.1 SP2,2 SP2, 3.0 SP2, 3.5 SP1, 4 client profile 
installed
Office name and version(32/64bit) : Excel 2007
Browser name and version : IE 8
SeleniumWrapper version : 1.0.13.3

What steps will reproduce the problem with a public website ?
1. Here is my code. It is an example with an asp.net site

Public Sub test8()
  Dim driver As New SeleniumWrapper.WebDriver
  Dim By As New By, Assert As New Assert, Verify As New Verify, Waiter As New Waiter
  driver.Start "IE", "http://www.htc.com/"
  driver.setImplicitWait 5000

  driver.get "/www/support/"
  driver.findElementByXPath("(//input[@type='text'])[2]").Click
  driver.findElementByXPath("//button[@type='button']").Click
  driver.findElementById("ui-active-menuitem").Click
  End
  driver.Stop
End Sub

2.
3.

What is the expected output? What do you see instead?
I want to be able to end selenium, but leave the browser up so that I can click 
links. Instead none of he links are clickable until I manually end C:\Program 
Files\SeleniumWrapper\IEDriverServer.exe

Please provide any additional information below.

The problem does not occur in this code. I am able to click links no problem 
after ending the script.

Public Sub test9()
  Dim driver As New SeleniumWrapper.WebDriver
  Dim By As New By, Assert As New Assert, Verify As New Verify, Waiter As New Waiter
  driver.start "IE", "https://www.google.com/"
  driver.setImplicitWait 5000

  driver.get "/#gs_rn=23&gs_ri=psy-ab&cp=7&gs_id=6l&xhr=t&q=selenium&es_nrs=true&pf=p&biw=1920&bih=888&sclient=psy-ab&oq=selieni&gs_l=&pbx=1&bav=on.2,or.r_qf.&bvm=bv.49967636,d.cGE&fp=d791f201479bc82a"
  driver.findElementById("gbqfq").clear
  driver.findElementById("gbqfq").sendKeys "selenium"
  End
  driver.stop
End Sub

Original issue reported on code.google.com by justinea...@gmail.com on 30 Jul 2013 at 5:06

GoogleCodeExporter commented 9 years ago
It will work with the "nativeevents" option to false :

Dim driver As New SeleniumWrapper.WebDriver
Dim By As New By, Assert As New Assert, Verify As New Verify, Waiter As New 
Waiter
driver.setCapability "nativeEvents", False
driver.Start "ie", "http://www.htc.com"
driver.get "/www/support"
driver.findElementByCssSelector("div.selectProduct > button").Click   'Click on 
the product listbox
driver.findElementByXPath("//a[contains(text(),'HTC One')]").Click   'Select 
the HTC One
driver.findElementByLinkText("Unboxing").Click   'Click on the Unboxing link

Original comment by florentbr on 1 Aug 2013 at 8:29

GoogleCodeExporter commented 9 years ago
Thank you! I will test this tomorrow at work! The website I am using is on 
intranet so I had to find a public site where the problem occurred. Thank you 
again! 

Original comment by justinea...@gmail.com on 1 Aug 2013 at 10:04

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40