Comments (8)
Maby the rendering is not finished when the copy command is executed.
Try to wait a bit longer before each copy :
selenium.wait 2000
selenium.getScreenshot().copy
Have you tried with other browsers ?
Original comment by florentbr
on 20 Mar 2013 at 4:53
from selenium-vba.
Hi...
Now I realised that this Problem only occure when I use the getScreenshot in a
function from another function.
example:
Private Sub TestSub(Zeile As Integer)
(normal selenium Test which works fine)
Screenshot
End Sub
Private Function Screenshot()
Dim selenium As New SeleniumWrapper.WebDriver
'Mache einen Screenshot
selenium.Wait 1000
selenium.getScreenshot().Copy
'Speichere Screenshot auf ReportSeite
Sheets(6).Range("A10").PasteSpecial
End Function
====
Original comment by [email protected]
on 21 Mar 2013 at 8:27
from selenium-vba.
When I switch of the "on error resume next" I get the message "Ungültiger
Zeiger" (Invalid Pointer on English) ...
I can't understand it because the selenium.wait works without Problem
Original comment by [email protected]
on 21 Mar 2013 at 9:54
from selenium-vba.
Your probably get this error because you forgot the "open" command in your
example.
If it doesn't solve your problem, please provide a full example using a public
website that will reproduce the issue.
Original comment by florentbr
on 21 Mar 2013 at 1:14
from selenium-vba.
In the Exampel the "Open" Comman is in the Sub "TestSub"
Original comment by [email protected]
on 22 Mar 2013 at 1:51
from selenium-vba.
In your Screenshoot function, you are creating a new browser instance (New
SeleniumWrapper.WebDriver) without using the open command, which leads on a
failure on the getScreenshoot as there is no webpage.
The rigth syntax is :
Private Sub TestSub(Zeile As Integer)
Dim selenium As New SeleniumWrapper.WebDriver
(normal selenium Test which works fine)
Screenshot selenium
End Sub
Private Function Screenshot(Byref selenium as SeleniumWrapper.WebDriver)
'Mache einen Screenshot
selenium.Wait 1000
selenium.getScreenshot().Copy
'Speichere Screenshot auf ReportSeite
Sheets(6).Range("A10").PasteSpecial
End Function
Original comment by florentbr
on 22 Mar 2013 at 2:21
from selenium-vba.
Perfect ;-) Thank you very much!
Original comment by [email protected]
on 22 Mar 2013 at 3:15
from selenium-vba.
Original comment by florentbr
on 25 Mar 2013 at 12:07
- Changed state: Done
from selenium-vba.
Related Issues (20)
- how to get innertext or textcontent with selenium HOT 2
- extract product data from web HOT 7
- Unable to open the URLs in the excel file using chrome HOT 4
- Unable to use chrome browser to work HOT 6
- Method <type> failed HOT 2
- Selenium user session cookies HOT 1
- Set HTMLDOC = driver.Document Here I would like to know the source for the Document. HOT 1
- how to scroll down till element is visible HOT 2
- Click item "a" and "href =" HOT 3
- how to identify if page has scrollbar, using Selenium VBA HOT 2
- how to send user credentials through VBA selenium HOT 4
- The execution is getting slower. HOT 1
- How to click button with no ID, Name or Value HOT 2
- How to set a profile in VBA (excel) HOT 2
- Compatability With Firefox 36 HOT 4
- Selenium VB.net "NuGet Package" HOT 3
- Can not switch frames HOT 2
- Find correct Element with Different Elements Having same ID HOT 1
- Update to 2.45 HOT 1
- Click failed (id=xxxx not found) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from selenium-vba.