我一直在Ashot Library和Browserstack API上使用Selenium,以获取设备的屏幕截图。并且通过射击策略,我注意到有一些可用的策略有"模拟器"策略。
Ashot库的文档很少:/
public static ShootingStrategy iPad2WithIOS8() {
VariableCutStrategy cutStrategy = new VariableCutStrategy(41, 65, 960);
return viewportNonRetina(500, cutStrategy);
}
public static ShootingStrategy iPad2WithIOS8Simulator() {
VariableCutStrategy cutStrategy = new VariableCutStrategy(41, 65, 1250);
return viewportNonRetina(500, cutStrategy);
}
public static ShootingStrategy iPad2WithIOS8Retina() {
VariableCutStrategy cutStrategy = new VariableCutStrategy(41, 65, 960);
return viewportRetina(500, cutStrategy, 2.0F);
}
public static ShootingStrategy iPad2WithIOS8RetinaSimulator() {
VariableCutStrategy cutStrategy = new VariableCutStrategy(41, 65, 1250);
return viewportRetina(500, cutStrategy, 2.0F);
每个中的每个都有一个模拟器版本。有人知道它们有什么区别吗?
也许是因为其中一个用于仿真,而其他设备也用于真实设备。