Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 97756

Using Reusable Methods in Selenium Page Object Model

$
0
0

I was trying to use a reusable method in my framework. however, I am little confused about the new keyword in the last line. Without the new keyword, the return shows me an error.

public Home_Page hover() throws IOException, InterruptedException { Reusable_Class.mouseHover(driver, personalBank, 0, logger, "hovering on personal banking"); return new Home_Page(driver);

Can anyone please explain, why we need a return new instead of return?


Viewing all articles
Browse latest Browse all 97756

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>