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/"]');

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

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