ravin_perl has asked for the wisdom of the Perl Monks concerning the following question:
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?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Make use of a java object in Perl
by jeffa (Bishop) on Mar 31, 2015 at 21:33 UTC | |
|
Re: Make use of a java object in Perl
by GotToBTru (Prior) on Mar 31, 2015 at 19:22 UTC | |
|
Re: Make use of a java object in Perl
by choroba (Cardinal) on Mar 31, 2015 at 22:19 UTC | |
|
Re: Make use of a java object in Perl
by locked_user sundialsvc4 (Abbot) on Mar 31, 2015 at 20:52 UTC | |
by Your Mother (Archbishop) on Mar 31, 2015 at 21:39 UTC | |
by locked_user sundialsvc4 (Abbot) on Apr 01, 2015 at 12:48 UTC | |
by Anonymous Monk on Apr 01, 2015 at 13:30 UTC |