There is a perl program which makes use of Inline::Java module to call the googleTest of java class written above. Perl program looks like.public class TestSelenium { public void googleTest() throws Exception { WebDriver driver = new InternetExplorerDriver(); driver.get("http://www.google.com/webhp?complete=1&hl=en"); } }
Now the above Perl code will open IExplorer and go to google.com page. In my Perl program further to $test->googleTest; I want to make use of same browser that was opened by java(WebDriver driver = new InternetExplorerDriver();) and perform a search for text "Cheese".use warnings; use Selenium::Remote::Driver; use Inline Java => 'STUDY', CLASSPATH => 'C:\selenium\selenium-java-2.37.0\selenium-2.37.0\libs\se +lenium-java-2.37.0.jar;C:\selenium\SeleniumTestPoc\bin\MyJar.jar;C:\s +elenium\selenium-java-2.37.0\selenium-2.37.0\libs\selenium-server-sta +ndalone-2.37.0.jar', STUDY => ['TestSelenium']; $test= TestSelenium->new; $test->googleTest;
Question is, can the object of WebDriver class("driver" in this case) be further used in my Perl program so that I can use same browser and perform different UI operations on it in Perl?
In reply to Make use of a java object in Perl by ravin_perl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |