mobileemulation

Fitting objects in window screen using Selenium Java

时光毁灭记忆、已成空白 提交于 2019-12-14 02:35:52
问题 I am trying to fit all the objects in the window (Chrome browser). Manually when I am doing it(the dimensions that I am using is 1024X786 using toggle bar, but when I am automating it using the same dimension, it's not showing the same as it was manually. The following is the code: driver = new ChromeDriver(); Map<String, Object> deviceMetrics = new HashMap<String, Object>(); deviceMetrics.put("width", 768); deviceMetrics.put("height", 1024); Map<String, Object> mobileEmulation = new HashMap