seleniumtestsframework
seleniumtestsframework copied to clipboard
Firefox test is not working
I cloned https://github.com/tarun3kumar/seleniumtests and changed the testng.xml to use firefox, but it's not working. In my own project, I cannot use firefox either. The profile is not found in /classes/ffprofile\customFFprofile. Please take a look, thanks.
Are you using ff version 47 ?
On Thursday, June 23, 2016, Malcolm Shen [email protected] wrote:
I cloned https://github.com/tarun3kumar/seleniumtests and changed the testng.xml to use firefox, but it's not working. In my own project, I cannot use firefox either. The profile is not found in /classes/ffprofile\customFFprofile. Please take a look, thanks.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/tarun3kumar/seleniumtestsframework/issues/9, or mute the thread https://github.com/notifications/unsubscribe/ALD1vUeCoCDtaAC_aJPJtPTEcBYoxU7nks5qOfKlgaJpZM4I8Z0A .
Thanks Tarun K
Yes. But I guess it's not related to FF version. It just cannot find the profile.
customFFprofile seems a diff error but FF 47 is not yet supported. Please check this -
https://github.com/SeleniumHQ/selenium/issues/2257
I can downgrad my FF. Could you please fix this diff error?
@malcolmshen which version of FF are you using? Are you using custom FF profile? Could you post your code snippet?
I'm using Firefox47 now, it was version 46, but silently upgraded. I'm not using custom FF profile. I just cloned https://github.com/tarun3kumar/seleniumtests and changed the parameter
In my project, I ran my test and the target folder generated looks like:

however, the log says: Start creating web driver instance: *firefox start create firefox start create profile Extracting jar file::: /D:/maven_repo/com/seleniumtests/seleniumtestsframework/4.0.8/seleniumtestsframework-4.0.8.jar Firefox Profile: /D:/work/myproject/core/target/classes/ffprofile\customFFprofile
There is no such folder customFFprofile, so the firefox web driver is not created.
Looks like you are running an old version of seleniumtests project. The latest STF version is 4.0.13
I am on Firefox47 and this is error message I see -
Thread[PoolService-0,5,main]:Wed Jun 29 15:33:48 CEST 2016:::Start creating web driver instance: *firefox
Thread[PoolService-1,5,main]:Wed Jun 29 15:33:48 CEST 2016:::Start creating web driver instance: *firefox
Thread[PoolService-0,5,main]:Wed Jun 29 15:33:48 CEST 2016:::Start creating web driver instance: *firefox
start create firefox
Thread[PoolService-0,5,main]:Wed Jun 29 15:33:48 CEST 2016:::Start creating web driver instance: *firefox
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
","creator":"Canonical Ltd.","homepageURL":null},{"locales":["sl"],"name":"Ubuntu Modifications","description":"Ubuntu razširitve za Firefox.","creator":"Canonical Ltd.","homepageURL":null},{"locales":["sv-SE"],"name":"Ubuntu Modifications","description":"Ubuntu-paket för Firefox.","creator":"Canonical Ltd.","homepageURL":null},{"locales":["uk"],"name":"Ubuntu Modifications","description":"Убунтівські доповнення до Firefox.","creator":"Canonical Ltd.","homepageURL":null},{"locales":["zh-CN"],"name":"Ubuntu Modifications","description":"Ubuntu 火狐扩展包.","creator":"Canonical Ltd.","homepageURL":null},{"locales":["zh-TW"],"name":"Ubuntu Modifications","description":"Ubuntu Firefox 擴充包。","creator":"Canonical Ltd.","homepageURL":null}],"targetApplications":[{"id":"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}","minVersion":"9.0","maxVersion":"37.0a1"}],"targetPlatforms":[],"multiprocessCompatible":false,"signedState":2,"seen":true}
On a different note I added marionette support to STF and you can use it run test on FF-47. Have a look at [testng.xml](https://github.com/tarun3kumar/seleniumtests/blob/master/testng.xml file) for one sample test using marionette driver. Beware that marionette is yet not production ready and I had trouble running tests in parallel.
So the best bet would be to run tests on a lower version of FF preferably FF-45
Thank you. However, the same issue for me when switching to the latest 4.0.13. Let me do some further research to see if I can figure out the root cause. BTW, the 4.0.13 source code is not found in maven repository.
I see the source jar file here - http://repo1.maven.org/maven2/com/seleniumtests/seleniumtestsframework/4.0.13/
btw selenium version 2.53.1 was released yesterday and it supposedly fixes FF-47 issue. You could also try this.
Thanks, after some research I found the difference between my project and the sample project is the useFirefoxDefaultProfile is off in the sample project.
<parameter name="useFirefoxDefaultProfile" value="false"/>
When turned on, the sample project cannot find the default profile, either. The error is: "selenium.firefox.UnableToCreateProfileException: Given model profile directory d oes not exist: D:\software\git\seleniumtests-master\target\test-classes\ffprofile\customFFprofile"
BTW, for selenium 2.53.1, I cannot download it from maven repo and I didn't find a tag in github either. Is it offically released?
I would remove this property, don't see much value having it.
BTW, for selenium 2.53.1, I cannot download it from maven repo and I didn't find a tag in github either. Is it offically released?
I read a tweet about this last night from Jim - https://www.nuget.org/packages/Selenium.WebDriver
Sorry the fix is in new FF version 47.1. Please check last comment on - https://github.com/SeleniumHQ/selenium/issues/2110
If you remove property "useFirefoxDefaultProfile", since the default value is true, the sample project will fail when running with Firefox. This should be fixed before any action is taken. I tried FF47.0.1, I can see the firefox is launched, but finally there is still the error:
org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: /C:/Users/Malcolm/AppData/Local/Temp/anonymous218342461207895400webdriver-profile/extensions/[email protected]/components/mozCNGuard.js, line 124: ReferenceError: CETracking is not defined JavaScript error: http://offlintab.firefoxchina.cn/static/preload.html, line 131: ReferenceError: mozIndexedDB is not defined
Please check last comment on - SeleniumHQ/selenium#2110
What's the client libraries he mentioned? Do I need to do some upgrade?
selenium 2.43.1 is also released - http://www.seleniumhq.org/download/ I assume that this should work with FF 47.1
Would look in to useFirefoxDefaultProfile some time later
Thank you. I'm trying selenium2.53.1 and FF47.0.1. But I still have on luck. Found some NoDefClassException about Proxies.class of selenium, firefox is not launched. I'm still working on it.
what's the exact error? I guess it is some missing dependency. I was able to get FF 47.0.1 to work
i'm currently working on another project, will try again and let you know the details. thanks for asking
I force-updated maven dependencies and did a completely clean build, the issue is gone. now i'm able to test with fiirefox. Thank you, Tarun. So the conclusion of this issue is just update selenium to 2.53.1 or later and Firefox to 47.0.1 or later.
glad it worked :+1:
Forgot one thing, The configuration "useFirefoxDefaultProfile" should be "false" as well. Otherwise, it would still have the "profile not found" error.
hallo, I want to ask, what is the difference between mocktestng.xml and testng.xml ? @tarun3kumar
Your comments are rare 。
@wuxiansen mocktestng.xml is a mock file which you can use as sandbox
while testng.xml is for production usage.
btw this is not right place to ask such question, please post your question in an appropriate forum in - www.seleniumtests.com/p/testing-forum.html