| 123456789101112131415161718192021222324252627282930313233 |
- var webdriverio = require('webdriverio');
- var options = {
- desiredCapabilities: {
- browserName: 'firefox'
- }
- };
- console.log('lets go!');
- var client = webdriverio.remote(options);
- console.log(client);
- try {
- try {
- client
- .init()
- .url('https://duckduckgo.com/')
- .setValue('#search_form_input_homepage', 'WebdriverIO')
- .click('#search_button_homepage')
- .getTitle().then(function(title) {
- console.log('Title is: ' + title);
- // outputs:
- // "Title is: WebdriverIO (Software) at DuckDuckGo"
- })
- .end();
- }
- catch(e) {
- console.log(e);
- }
- }
- finally {
- console.log('end');
- }
|