java - Search for keyword in .txt file on web with Selenium -
can me, how search keyword in .txt file selenium , file on internet. if keyword found should redirect webpage.
to make clear, link textfiles.com/internet/autonet.txt, have keyword, screen. so, need search keyword on webpage , if finds keyword, webpage should opened. doing selenium, stuck, because don't know how accomplish this
try solution.
in selenium page.
public boolean istextpresent(string str) { iwebelement bodyelement = driver.findelement(by.tagname("body")); return bodyelement.text.contains(str); }
then later can redirect other page. think redirection more business logic, should not part of selenium tests
Comments
Post a Comment