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

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -