Code Monkey home page Code Monkey logo

Comments (12)

rovner avatar rovner commented on August 20, 2024

Hi, shivakrishnach31. It looks like you have a retina device, so you need to scale your screenshots with ScalingDecorator. Also you need to cut browser header with CuttingDecorator. For convenience there are several shortcut methods in ShootingStrategies. Probably, you could use iPad2WithIOS8RetinaSimulator or iPad2WithIOS8Retina. If not, please, try viewportRetina method.

from ashot.

shivakrishnach31 avatar shivakrishnach31 commented on August 20, 2024

Thankyou @rovner , It is working now. But for Android also I have used iPad2WithIOSRetinaSimulator. I believe that was not good practice. Do we have any other method to do this for Android emulators?

from ashot.

pazone avatar pazone commented on August 20, 2024

@shivakrishnach31 Wich Android emulator do you prefer? Also try to avoid retina displays. It can produce some memory issues with large pages.

from ashot.

shivakrishnach31 avatar shivakrishnach31 commented on August 20, 2024

@rovner , I want screenshots in Phone and Tablet. Do we have any other method to capture proper screenshots in Android phone and tablet other than iPad2WithIPSRetinaSimulator. Actually when I used iPad2WithIPSRetinaSimulator to capture screenshots in Android phone and tablet, the webpage header slightly cut off in screenshots. Is this because of iPad2WithIPSRetinaSimulator ?. Could you please help me to get the proper screenshot in Android phone and tablet.

from ashot.

rovner avatar rovner commented on August 20, 2024

@shivakrishnach31, there are no shortcut methods for android phone and tablet, because andriod browsers differs a lot. So you have to use ShootingStrategies.viewportRetina method and provide proper scrollTimeout (probably 1000), headerToCut (depends on device/emulator), footerToCut (also depends on device/emulator, most likely it is 0) and dpr (should be 2F for you) .

from ashot.

shivakrishnach31 avatar shivakrishnach31 commented on August 20, 2024

Thanks @rovner . It worked. But there is lot empty space(Black coloured area) in screenshot. Can't be overcome that empty space(black coloured area). Please see the attached screenshots...

android_htc one m8 homepage

android_samsung galaxy tab 4 10 1 homepage

from ashot.

rovner avatar rovner commented on August 20, 2024

Hi, @shivakrishnach31! Could you attach code sample for this?

from ashot.

pazone avatar pazone commented on August 20, 2024

So, what's new in this issue? Was problem solved?

from ashot.

shivakrishnach31 avatar shivakrishnach31 commented on August 20, 2024

@pazone , Thanks for the support. Yes, the problem got solved.

from ashot.

pazone avatar pazone commented on August 20, 2024

@shivakrishnach31 you are welcome

from ashot.

fagnerpaes avatar fagnerpaes commented on August 20, 2024

Thanks @rovner . It worked. But there is lot empty space(Black coloured area) in screenshot. Can't be overcome that empty space(black coloured area). Please see the attached screenshots...

android_htc one m8 homepage

android_samsung galaxy tab 4 10 1 homepage

Hi @shivakrishnach31, @pazone

There is an opne issue #124 that reported the same problem.

How were you resolve the problem?

Thanks!

from ashot.

Kiera11 avatar Kiera11 commented on August 20, 2024

Hi,
@shivakrishnach31
I would like to know how did u test for different devices such as:
Iphone
Samsung
Ipad

I have indeed use the following:
new AShot().shootingStrategy(ShootingStrategies.viewportRetina(1000,0,0,2F))
but the screenshot taken are for ipad.

Thanks,

from ashot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.