Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox test is not working #9

Open
malcolmshen opened this issue Jun 23, 2016 · 22 comments
Open

Firefox test is not working #9

malcolmshen opened this issue Jun 23, 2016 · 22 comments

Comments

@malcolmshen
Copy link
Contributor

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.

@ghost
Copy link

ghost commented Jun 23, 2016

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
#9, or mute
the thread
https://github.com/notifications/unsubscribe/ALD1vUeCoCDtaAC_aJPJtPTEcBYoxU7nks5qOfKlgaJpZM4I8Z0A
.

Thanks
Tarun K

@malcolmshen
Copy link
Contributor Author

malcolmshen commented Jun 24, 2016

Yes. But I guess it's not related to FF version. It just cannot find the profile.

@tarun3kumar
Copy link
Owner

customFFprofile seems a diff error but FF 47 is not yet supported. Please check this -

SeleniumHQ/selenium#2257

@malcolmshen
Copy link
Contributor Author

I can downgrad my FF. Could you please fix this diff error?

@tarun3kumar
Copy link
Owner

@malcolmshen which version of FF are you using? Are you using custom FF profile? Could you post your code snippet?

@malcolmshen
Copy link
Contributor Author

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 testng.xml. I ran the test, but no firefox driver was created.

In my project, I ran my test and the target folder generated looks like:
default

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.

@tarun3kumar
Copy link
Owner

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

@malcolmshen
Copy link
Contributor Author

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.

@tarun3kumar
Copy link
Owner

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.

@malcolmshen
Copy link
Contributor Author

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?

@tarun3kumar
Copy link
Owner

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

@tarun3kumar
Copy link
Owner

Sorry the fix is in new FF version 47.1. Please check last comment on - SeleniumHQ/selenium#2110

@malcolmshen
Copy link
Contributor Author

malcolmshen commented Jul 1, 2016

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?

@tarun3kumar
Copy link
Owner

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

@malcolmshen
Copy link
Contributor Author

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.

@tarun3kumar
Copy link
Owner

what's the exact error? I guess it is some missing dependency. I was able to get FF 47.0.1 to work

@malcolmshen
Copy link
Contributor Author

i'm currently working on another project, will try again and let you know the details. thanks for asking

@malcolmshen
Copy link
Contributor Author

malcolmshen commented Jul 6, 2016

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.

@tarun3kumar
Copy link
Owner

glad it worked 👍

@malcolmshen
Copy link
Contributor Author

Forgot one thing, The configuration "useFirefoxDefaultProfile" should be "false" as well. Otherwise, it would still have the "profile not found" error.

@wuxiansen
Copy link

wuxiansen commented Jun 27, 2017

hallo, I want to ask, what is the difference between mocktestng.xml and testng.xml ? @tarun3kumar

Your comments are rare 。

@tarun3kumar
Copy link
Owner

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants