FuckTheWorld / chromedriver

Automatically exported from code.google.com/p/chromedriver
0 stars 0 forks source link

ChromeDriver 2.15 Device Emulation fails when using the Amazon Kindle 7" and 8.9" choices #1085

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Issue Description:
When trying to use the Amazon Kindle Fire HDX 7" or Amazon Kindle Fire HDX 8.9" 
as devices to emulate in my Python/Webdriver code, it fails with "must be a 
valid device". Note, I did verify that the " was escaped properly in my code.

Steps to reproduce (if relevant, you MUST provide a simplified html page or
link to public site):
1. Create code in which you create a webdriver instance with chromedriver and 
use device emulation.
2. Try to use any of the Kindle Fire options and see that it fails.

Original issue reported on code.google.com by jonathan...@gmail.com on 24 Apr 2015 at 1:01

GoogleCodeExporter commented 9 years ago
This issue is reproducible. tested with latest version of ChromeDriver(2.15), 
Selenium (2.45) and Chrome(42.xx.xx.)
unable to select and Amazon Kindle Fire HDX 7" OR 8.9" device in mobile 
emulation.

------------------ java------------
 Map<String, String> mobileEmulation = new HashMap<String, String>(); 
Map<String, Object> chromeOptions = new HashMap<String, Object>(); 
mobileEmulation.put("deviceName", "Amazon Kindle Fire HDX 7\""); 
chromeOptions.put("mobileEmulation", mobileEmulation); 

DesiredCapabilities capabilities = DesiredCapabilities.chrome(); 
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions); 

WebDriver driver = new ChromeDriver(capabilities); 
driver.get("http://www.google.com"); 
driver.findElement(By.name("q")).sendKeys("testing"); 
driver.findElement(By.name("btnG")).click(); 
driver.quit();

Original comment by agau...@chromium.org on 28 Apr 2015 at 6:13

GoogleCodeExporter commented 9 years ago
Thanks. Not that it matters but I was using Python. I use this for work 
purposes so the sooner the fix the better. Any idea at this point when that 
might be? We could use this functionality!

Thanks!

Original comment by jonathan...@gmail.com on 28 Apr 2015 at 9:15

GoogleCodeExporter commented 9 years ago
As a workaround can you try with creating custom device same as Amazon Kindle 
Fire HDX 7 resolution;  mentioned here:- 
https://sites.google.com/a/chromium.org/chromedriver/mobile-emulation
"Specifying Individual Device Attributes" 

OR

Create custom device in the panel with the help of this :- 
Custom Devices :- https://developer.chrome.com/devtools/docs/device-mode

then access custom device through code.

Original comment by agau...@chromium.org on 30 Apr 2015 at 11:36

GoogleCodeExporter commented 9 years ago

Original comment by gmanikp...@chromium.org on 26 May 2015 at 11:01