sagarpabba / selenium-vba

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

Selenium vba cant click on button or link #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Operating system :
.Net Framework version :last
Office Version :last
SeleniumWrapper version :last

What is your issue ?

I was trying to click on a link and a button, also tried on clicking google 
result link, doesn't work.it also not working on wordpress login button. im 
usung firefox 26 

Here is a sample code which suppose to click on a button.its not working , but 
its working on ie.i need it to work in firefox

  selenium.open "http://www.perfectseotools.com/free-article-rewriter/default.aspx"
  selenium.selectWindow "Free Article Rewriter | Perfect SEO Tools"
  selenium.type "id=txtText", "" & forspin & ""
  selenium.clickAndWait "id=btnSubmit"
  WScript.sleep 5000
  spinedtext = selenium.getText("css=div.blk-content")

please help

Original issue reported on code.google.com by shan4sha...@gmail.com on 6 Jan 2014 at 12:07

GoogleCodeExporter commented 9 years ago
Sorry the code was like this

  Dim selenium
  Set selenium = CreateObject("SeleniumWrapper.WebDriver")
  selenium.start "firefox", "https://www.google.com/"
  selenium.setImplicitWait 5000  
  selenium.open "http://www.perfectseotools.com/free-article-rewriter/default.aspx"
  selenium.type "id=txtText", "" & forspin & ""
  selenium.clickAndWait "id=btnSubmit"
  WScript.sleep 5000
  spinedtext = selenium.getText("css=div.blk-content")
  MsgBox(spinedtext)

Original comment by shan4sha...@gmail.com on 6 Jan 2014 at 12:12

GoogleCodeExporter commented 9 years ago
I've played your script and it worked on every steps. There is no text typed as 
your variable forspin is not assigned. As far as i know it could also be an 
antivirus, antispyware or peerblock who's blocking the automation.
Here is your script with the root url corrected and some content to type :

Set selenium = CreateObject("SeleniumWrapper.WebDriver")
selenium.setImplicitWait 5000
selenium.start "firefox", "http://www.perfectseotools.com"
selenium.open "/free-article-rewriter/default.aspx"
selenium.type "id=txtText", "lorem ipsum"
selenium.clickAndWait "id=btnSubmit"
spinedtext = selenium.getText("css=div.blk-content")
MsgBox(spinedtext)

Original comment by florentbr on 7 Jan 2014 at 4:08

GoogleCodeExporter commented 9 years ago
Thank you very much for your reply.

I have avast antivirus and malwarebyte anti malware. how can i know which one 
blocking the automation.

how can i make this work on firefox. can you please give me some suggestions.

Thanks in advance.

c

Original comment by shan4sha...@gmail.com on 7 Jan 2014 at 5:07

GoogleCodeExporter commented 9 years ago
I would try to temporally disable each of them one by one and see if it works. 
If you don't feel comfortable this way, I recommend you to work on a virtual 
machine like Virtual PC.

I would also try to use a Firefox profile just in case it's a proxy issue. You 
must first create the "Selenium" profile in Firefox 
(http://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-p
rofiles ). Here is an example on how to use it :

Set selenium = CreateObject("SeleniumWrapper.WebDriver")
selenium.setImplicitWait 5000
selenium.setProfile "Selenium"
selenium.start "firefox", "http://www.perfectseotools.com"
selenium.open "/free-article-rewriter/default.aspx"
...

Original comment by florentbr on 7 Jan 2014 at 5:45

GoogleCodeExporter commented 9 years ago

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