Answers for "Get text"

0

Get text

const assert = require('assert')

describe('v5.webdriver.io', () => {

    it('should demonstrate the gettext function', async () => {
       await browser.url('https://v5.webdriver.io')
       
       const blogButton = await $('[href="/blog/"]');

       const xblogButton = await blogButton.getText()
       console.log( "text for element:" +xblogButton);

      
    })
})
Posted by: Guest on April-17-2022
0

get text

const assert = require('assert')

describe('v5.webdriver.io', () => {

    it('should demonstrate the gettext function', async () => {
       await browser.url('https://v5.webdriver.io')
       
       const blogButton = await $('[href="/blog/"]');
      
       console.log( "text for element:" +await blogButton.getText());

      
    })
})
Posted by: Guest on April-17-2022

Code answers related to "Javascript"

Browse Popular Code Answers by Language