java - How to read a text from a page using Helium? -


enter image description here

i want read text showing in picture , want print text using helium. tried following code

import org.openqa.selenium.webdriver;  //import com.heliumhq.selenium_wrappers.webdriverwrapper;  import static com.heliumhq.api.*;   public class mainclass {      public static void main(string[] args) {         webdriver ff = startfirefox("http://172.16.0.200:8001/");         waituntil(text("streams tech, inc.").exists);          streamstech lg = new streamstech();         lg.login(ff);          if (getdriver().getvalue().contains("you have not purchased product yet. please visit our product list try out different products!"))                 system.out.println("you have not purchased product yet. please visit our product list try out different products!");             else                 system.out.println("test failed :(");         //string text = getvalue("you have not purchased product yet. please visit our product list try out different products!");         killbrowser();     } } 

but getvalue() getting error "the method getvalue() undefined type webdriver" appreciate help. in advance.

solved problem

text("my desire text").getvalue();  

this command reading string


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -