Hi There,
Greeting of the Day.!!!!
I am writing scripts in J meter 3.0 its a good Experience so far.
But I have stuck to one thing now for which I am fighting for solution.
With Fire fox it works fine, but when I am trying to run Same Scripts on Chrome I got an Issue that Scrolling of UI doesn't happen in Chrome the way it works for Fire fox. So for Chrome we need to add Code to Scroll the UI to that Element
I have Used two approaches:
1.) Action Class
var act = JavaImporter(org.openqa.selenium.interactions.Actions)
var builder = new act.Actions(WDS.browser)
builder.moveToElement(WDS.browser.findElement(pkg.By.xpath("//input[@id='submit_btn']"))).perform();
WDS.log.info("Performed Done")
builder.click();
WDS.log.info("Clicking Done");
This Sampler gave no Syntax Error and it Successfully Printed "Clicking Done"(So I am assuming above Lines executed fine)
But on the UI , nothing happened
2.) Java Executor
var je = js.((JavascriptExecutor) WDS.browser)
var je = new js.((JavascriptExecutor) WDS.browser)
je.executeScript("arguments[0].scrollIntoView(true);", WDS.browser.findElement(pkg.By.xpath("//input[@id='submit_btn']")));
This too gave Error for second Line (var je = new js.((JavascriptExecutor) WDS.browser))
ERROR - com.googlecode.jmeter.plugins.webdriver.sampler.WebDriverSampler: sun.org.mozilla.javascript.internal.EvaluatorException: missing ) in parenthetical (<Unknown source>#12) in <Unknown source> at line number 12
It would be great If you guys can help me out with this
Thanks in Advance !!!!!!
Regards,
Payal Sharma
(Software Tester @ Hughes Systique)
Hi There,
Greeting of the Day.!!!!
I am writing scripts in J meter 3.0 using Selenium + Java