简体   繁体   中英

How to handle Geo location popup in chrome browser using KARATE

i'm trying with this code but i can't get an expected behavior.

Geolocation popup

* configure driver = {type:'chrome', addOptions:['--disable-geolocation', '--disable-extensions',  '--test-type'], webDriverSession: { desiredCapabilities: { "goog:chromeOptions": { useAutomationExtension: false} } } }
* driver 'https://es.infobyip.com/browsergeolocation.php'

It works perfectly if you use chromedriver. Refer below code snippet which currently I am using.

Background: 
* def session = { capabilities: { alwaysMatch: { browserName: 'chrome', 'goog:chromeOptions': { args: [ '--disable-geolocation', '--test-type' ] } } } }
* configure driver = { type: 'chromedriver', port: 9515, executable: '<Path to chromedriver>', webDriverSession: '#(session)'}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM