Total Pageviews

Monday 12 January 2015

ChromeDriver: Mobile Emulation

ChromeDriver is a standalone server which implements WebDriver's wire protocol.

[C#]

    var mobileEmulation = new Dictionary
    {
        { "deviceName", "Apple iPhone 5" }
    };
    var options = new ChromeOptions();
    options.AddAdditionalCapability("mobileEmulation", mobileEmulation);
    driver = new ChromeDriver(options);
  
Tips:
  • The “mobileEmulation” dictionary must use a valid device name from the DevTools Emulation panel.  
    
 
Reference:
 
ChromeDriver
Provides a mechanism to write tests against Chrome 

ChromeOptions
Class to manage options specific to ChromeDriver

AddAdditionalCapability
Provides a means to add additional capabilities not yet added as type safe options for the Chrome driver. 

26 comments:

  1. We are specialized in programming in Australia, here are options for plc programming and industrial automation engineer. You can get services about factory automation, scada programming, plc programmer, allen bradley programming, plant pax, PlantPAx, plc programming Melbourne and plc programming Australia.

    ReplyDelete
  2. I must thank you for the efforts you have put in penning this site. I am hoping to check out the same high-grade content by you later on as well. In truth, your creative writing abilities has inspired me to get my own, personal blog now..

    Selenium Training in Chennai

    ReplyDelete
  3. Finding the time and actual effort to create a superb article like this is great thing. I’ll learn many new stuff right here! Good luck for the next post buddy..
    Isoft Innovation
    Isoft Innovations Facebook

    ReplyDelete
  4. I am really happy with your blog because your article is very unique and powerful for new reader.
    selenium training in chennai

    ReplyDelete
  5. I would like to say that this blog really convinced me to update my knowledge about the technology you talk about. Thanks, very good post
    Selenium Training in Porur
    Selenium Training in Chennai
    Selenium Training in Ambattur
    JAVA J2EE Training in Chennai
    JAVA J2EE Training Institutes in Chennai

    ReplyDelete
  6. Thank you for this great article which conveyed a good information.keep more updates

    Xamarin Course
    Xamarin Training Course
    Xamarin Classes
    Best Xamarin Course

    ReplyDelete
  7. Great articles, first of all Thanks for writing such lovely Post!

    edu-exam

    Guest posting sites

    ReplyDelete
  8. Awesome post. Really you are shared very informative concept... Thank you for sharing. Keep on
    updating...

    Guest posting sites
    Technology

    ReplyDelete
  9. your blog information's are really creative and It contains full of new innovative ideas.thank you for sharing with us.please update more data.
    Selenium training near me
    Selenium Training in Chennai
    Selenium Training in Vadapalani
    Selenium Training in Amjikarai

    ReplyDelete
  10. I appreciate your efforts because it conveys the message of what you are trying to say. It's a great skill to make even the person who doesn't know about the subject could able to understand the subject . Your blogs are understandable and also elaborately described. I hope to read more and more interesting articles from your blog. All the best.
    Python Online certification training
    python Training institute in Chennai
    Python training institute in Bangalore

    ReplyDelete
  11. This comment has been removed by the author.

    ReplyDelete
  12. I have read a few of the articles on your website now, and I really like your style of blogging. I added it to my favourites blog site list and will be checking back soon.thanks lot!!

    android training in chennai

    android online training in chennai

    android training in bangalore

    android training in hyderabad

    android Training in coimbatore

    android training

    android online training

    ReplyDelete