Python Forum
Thread Rating:
  • 1 Vote(s) - 1 Average
  • 1
  • 2
  • 3
  • 4
  • 5
selenium screenshot
#11
(Feb-25-2017, 08:00 AM)hai001 Wrote: Dear metulburr,

Appreciate your reply and solution. Could you please help me in knowing what are all the apps that we needed to run this code.

Thanks in advance for your help

I am not @metulburr  but what you need is Python and the two modules in the import statement. PIL and Selenium
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#12
You also need PhantomJS. Also you can use Pillow, friendly fork for PIL
Reply
#13
Hi Metulburr,


Thank you for the code,

I am getting an error message when execute the above code, I think that i am missing something to install before the execution. Please help me on the below query.

1. I installed Selenium successfully via cmd prompt with the command "pip install selenium" however how to install phantomJS?
Please help me.
Reply
#14
Hello!
Post the full error traceback. Without it, we can guess only. What is your OS? There is a download webpage on phantomjs.org. Also, a build one if you want to build it from source.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#15
(Feb-25-2017, 09:25 AM)darshan Wrote: 1. I installed Selenium successfully via cmd prompt with the command "pip install selenium" however how to install phantomJS?
Download phantomjs-2.1.1-windows.zip
Make a folder under root C:\ eg C:\phantom
Place the unzipped files also phantomjs.exe in that folder.
In code:
driver = webdriver.PhantomJS(executable_path='C:/phantom/phantomjs')
driver.set_window_size(1920,1080) 
Reply
#16
Hi Snippsat,

I am getting an "Unicode error"
Reply
#17
(Feb-25-2017, 11:05 AM)darshan Wrote: Hi Snippsat,

I am getting an "Unicode error"

Post your code (minimal, runnable snippet to reproduce the error) and full Traceback.
Reply
#18
(Feb-25-2017, 11:05 AM)darshan Wrote: I am getting an "Unicode error
Okay thanks for that info,i take a look into my crystal ball and see if i can find a answer Pray
Reply
#19
Quote:I am getting an "Unicode error"
not enough info
https://python-forum.io/misc.php?action=help&hid=19
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Taking screenshot ConsistentlyInconsistent 1 1,087 Sep-10-2023, 11:20 PM
Last Post: Larz60+
  Flask Can't Save Screenshot to Postgres Db firebird 3 2,372 Sep-21-2020, 09:22 PM
Last Post: firebird
  Store Screenshot Selenium + MongoDB Nuwan16 9 3,598 Aug-18-2020, 03:57 AM
Last Post: ndc85430
  Screenshot web page ! ABVSVL 3 3,315 Jul-11-2020, 01:39 PM
Last Post: snippsat
  screenshot arezoo 3 2,341 Apr-11-2020, 10:22 AM
Last Post: buran
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,624 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020