Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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());

      
    })
})
 
PREVIOUS NEXT
Tagged: #text
ADD COMMENT
Topic
Name
3+2 =