2017-10-27 4 views
0

Wie Übergeben eines Parameters an die "3G" in ChromeDriver und kann es getan werden?Wie Übergeben eines Parameters an die "3G" in ChromeDriver

Screenshot https://prnt.sc/h2aqf4

Map<string, string> mobileEmulation = new hashmap<string, string>(); 
mobileEmulation.put("devicename", "iPhone 6"); 
ChromeOptions options = new ChromeOptions(); 
options.setExperimentalOption("mobileEmulation", mobileEmulation); 
wd = new ChromeDriver(options); 

Selen 3.6.0, ChromeDriver-2,33

P/S Sorry, mein Englisch ist schlecht ...

Antwort

0

Sie networkThrottle Option können Sie auch detaillierte bekommen Informationen von URL, die ich unten geteilt habe.

https://bugs.chromium.org/p/chromedriver/issues/detail?id=984#c6

+0

mobileEmulation.put ("networkThrottling", "Fast 3G"); - funktioniert nicht. – Stanislav

+0

Presets: network_throttle = { "network": "Good 3G"} chrome_options.add_experimental_option ("networkThrottle", network_throttle) Customized: network_throttle = { "networkConditions": { "downloadThroughput": 10 „uploadThroughput "1 "latency": 500}} chrome_options.add_experimental_option (" networkThrottle“, network_throttle) oder network_throttle = { "networkConditions": { "Durchsatz": 10, "latency": 500}} chrome_options .add_experimental_option ("networkThrottle", network_throttle) - Es ist unmöglich, diesen Code anzuwenden. Wie es geht? – Stanislav

+0

funktioniert nicht Map networkThrottle = new HashMap (); networkThrottle.put ("Netzwerkname", "Fast 3G"); options.setExperimentalOption ("networkThrottle", networkThrottle); – Stanislav

Verwandte Themen