0
votes

I am trying to run My Jmeter webdriver script in blazemeter but the test is failing due to element not found. Locally elements are finding properly only in blazemeter it is failing why? My Jmeter script screenshot

Below is logs generated from blazemeter

 2017-11-29 05:00:08,924 INFO BlazeMeter: BlazeMeter startup script completed
2017-11-29 05:00:09,780 INFO o.a.j.JMeter: Running test (1511931609780)
2017-11-29 05:00:09,862 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : FacebookThread
2017-11-29 05:00:09,863 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group FacebookThread.
2017-11-29 05:00:09,863 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2017-11-29 05:00:09,863 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=14 perThread=14000.0 delayedStart=false
2017-11-29 05:00:09,870 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2017-11-29 05:00:09,870 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2017-11-29 05:00:09,874 INFO o.a.j.t.JMeterThread: Thread started: FacebookThread 1-1
2017-11-29 05:02:16,311 ERROR c.g.j.p.w.s.WebDriverSampler: Sourced file: inline evaluation of: ``import org.apache.jmeter.services.FileServer; import org.openqa.selenium; import . . . '' : Method Invocation wait.until : at Line: 19 : in file: inline evaluation of: ``import org.apache.jmeter.services.FileServer; import org.openqa.selenium; import . . . '' : wait .until ( ExpectedConditions .visibilityOfElementLocated ( By .xpath ( "//tr/td/input[@id='email']" ) ) ) 

Target exception: org.openqa.selenium.TimeoutException: Timed out after 100 seconds waiting for visibility of element located by By.xpath: //tr/td/input[@id='email']
Build info: version: '2.52.0', revision: '4c2593cfc3689a7fcd7be52549167e5ccc93ad28', time: '2016-02-11 11:22:43'
System info: host: 'r-v3-5a1e3e8aa6afc-0-c', ip: '10.240.0.9', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-96-generic', java.version: '1.8.0_141'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=28.0, platform=LINUX, browserConnectionEnabled=true, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 29d6d16b-619e-4ddc-a7b0-6c7c053ae36e
 in inline evaluation of: ``import org.apache.jmeter.services.FileServer; import org.openqa.selenium; import . . . '' at line number 19
2017-11-29 05:02:16,373 INFO o.a.j.t.JMeterThread: Thread is done: FacebookThread 1-1
2017-11-29 05:02:16,374 INFO o.a.j.t.JMeterThread: Thread finished: FacebookThread 1-1
2017-11-29 05:02:16,483 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2017-11-29 05:02:29,525 INFO o.a.j.JMeter: Command: Shutdown received from /127.0.0.1
2017-11-29 05:02:30,640 INFO o.a.j.JMeter: Command: StopTestNow received from /127.0.0.1

we can say it's because of it is not able to find element. But It is working locally and I tried changing the elemets also but it did not work.

1

1 Answers

0
votes

My expectation is that Selenium 2.52.0 doesn't work correctly with Firefox 28 so you should either downgrade your Selenium Java client libraries to i.e 2.41.0 or upgrade Firefox to i.e. 45.0

I also think you should raise this to BlazeMeter Support as they should have much more information on their infrastructure and will be able to suggest the best way of working around your issue.


Also be aware that starting JMeter 3.1 it is recommended to use Groovy language for any form of scripting so consider switching to Groovy on next available opportunity. See Apache Groovy - Why and How You Should Use It article for more information on why Groovy is the better scripting option