Answered question

Userpath is created in Neoload using selenium But NO transactions are present inside.

Used the updated java code mentioned here ... -> http://answers.neotys.com/questions/1390717-able-record-neoload-transaction-using-selenium ...... userpath was created automatically But there are NO transactions created inside Selenium User Path.

Please note that I do not want to create a JAR file which is later imported in Neoload & then executed, since it doesnt give me an option to look into my api calls, or helps me in variable extraction.

Please find attached Neoload Logs , Eclipse logs & Neoload screenshot

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points
Alexis N.
Alexis N.

Alexis N.

Level
2
1255 / 2000
points
Team

An additional property should be added for enabling the proxy on InternetExplorerDriver. Can you try with the following code for driver initialization:

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("ie.setProxyByServer", true);
final InternetExplorerDriver webDriver = new InternetExplorerDriver(
NLWebDriverFactory.addProxyCapabilitiesIfNecessary(capabilities));
webDriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

Did you find this useful ?

No (2)

Yes (0)

0%

0% of users found this answer useful

Other answers

Alexis N.
Alexis N.

Alexis N.

Level
2
1255 / 2000
points
Team

In the logs, we notice that nothing is recorded. When running the java code, do you see the Firefox window getting opened and browsing to your application URL?
If not, you may need to download the gecko driver (https://github.com/mozilla/geckodriver/releases) and add a line associated to the path of the executable at the beginning of your java code:
System.setProperty("webdriver.gecko.driver", "C:\\Selenium\\geckodriver.exe");

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points

@Alexis - I am using IE driver and yes i can see that browsing is happening with the steps i have mentioned.

Alexis N.
Alexis N.

Alexis N.

Level
2
1255 / 2000
points
Team

Did you keep the call to a the addProxyCapabilitiesIfNecessary method? This will set the proxy to NeoLoad recorder.

For example:
final InternetExplorerDriver webDriver = new InternetExplorerDriver(NLWebDriverFactory.addProxyCapabilitiesIfNecessary(new DesiredCapabilities()));

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points

@Alexis - Yes i did. still it doesn't show any transaction being recorded. Please find attached JAVA codes & eclipse logs.

Also I tried with Firefox but same result.

Firefox Version - 47.0.2
Gecko Driver version - geckodriver-v0.17.0-win64

Steps that I am following:
1) Launch neoload and open my project
2) Run eclipse

Is there any other information that I can provide from my side in order to resolve this issue ?

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points

@ Alexis - I tried your proxy code but no success. Is there any proxy setting for firefox ?\

When i am recording the same scenario in firefox it is getting recorded uisng neoload.

also one more thing, is selenium supported only in Neoload 6.0 ?

Alexis N.
Alexis N.

Alexis N.

Level
2
1255 / 2000
points
Team

Recording with Selenium is supported since NeoLoad 5.3.

The proxy issue is on the Selenium side, not the NeoLoad side, maybe you can find help in the Selenium community.

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points

@Alexis - After a lot of trial & error, I have finally made it work, thanks for your constant support, appreciate it .. pheww ... now my only question is since I have my recording, how do i Automatically extract cookies, replace them & add some variable extractors and replace them?

Is there a method/api written or I have to depend on Neoload's framework parameters for this ??

Nouredine A.
Nouredine A.

Nouredine A.

Level
4
5000 / 5000
points
Team

Since you fixed the issue on your side could you tell what was wrong so it can benefit all the users?

Regarding your extraction question, you do not need to manage cookies since they are automatically handled by NeoLoad. Only client cookies have to be manually handled.

Basically i would suggest you to look at the NeoLoad documentation here to learn how to use variable extractors.

Harsh S.
Harsh S.

Harsh S.

Level
1
181 / 750
points

@Nouredine - Surely .. The issue was compatibility of firefox version & gecko driver and the same thing with chrome as well. So, in the end I used IE driver on another machine, which resolved my issue.

I would like to thank you guys a lot for the prompt support, without which my problem of doing repetitive and mundane task could have never been solved .. You guys rock !!!