You can find it using xpath:
query("WebView xpath:'//div[text()=\"text from div\"]/*[@class=\"button\"]'")
OR
query("WebView xpath:'//div[contains(text(),\"text from div\")]/*[@class=\"button\"]'")
2nd is to find div by part of its text. The xpath above finds only buttons which are direct children of the div. If you need to find all buttons in this div use the following:
query("WebView xpath:'//div[text()=\"text from div\"]//*[@class=\"button\"]'")