kasq / silverlight-selenium

Automatically exported from code.google.com/p/silverlight-selenium
0 stars 1 forks source link

Build errors regarding ThoughtWorks.Selenium.Core.dll when using Silvernium #6

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create VS 2010 Project
2. Add references to all Selenium C# Client Drivers
3. Add reference to Silvernium-1.1.dll
4. Add the following code to Main: selenium = new DefaultSelenium("localhost", 
4444, "*firefox", "http://blah");
   selenium.Start();
   selenium.Open("http://blah");
   silvernium = new Silvernium(selenium, "blah");
5. Build

What is the expected output? What do you see instead?

I expected the code to build properly, instead I get the following errors due 
to [ new Silvernium(selenium, "blah"); ]:

Error   3   Argument 1: cannot convert from 'Selenium.ISelenium 
[c:\...\Downloads\selenium-dotnet-2.19.0\net40\ThoughtWorks.Selenium.Core.dll]' 
to 'Selenium.ISelenium'

Error   2   The best overloaded method match for 
'ThoughtWorks.Selenium.Silvernium.Silvernium.Silvernium(Selenium.ISelenium, 
string)' has some invalid arguments

Error   1   The type 'Selenium.ISelenium' is defined in an assembly that is not 
referenced. You must add a reference to assembly 'ThoughtWorks.Selenium.Core, 
Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'.

What version of the product are you using? On what operating system?

VS 2010
Silvernium 1.1
Selenium 2.18
Win 7 and Server 2008 R2

Please provide any additional information below.

Original issue reported on code.google.com by cuabo...@gmail.com on 22 Feb 2012 at 7:44

GoogleCodeExporter commented 9 years ago
Is this a problem with not adding all the needed references?  What is the list 
of all the references that need to be added to this project?

Original comment by punchbug...@gmail.com on 5 Mar 2012 at 10:24

GoogleCodeExporter commented 9 years ago
I'm having the same problem with FlashSelenium component
Can not even compile the application when creating the object

var flashApp = new FlashSelenium.FlashSelenium(selenium, "id");

tells 

Error   1   The type 'Selenium.ISelenium' is defined in an assembly that is not 
referenced. You must add a reference to assembly 'ThoughtWorks.Selenium.Core, 
Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=null'.   D:\Aleksey\oDesk\IEScreenshots\IEScreenshots\ScreenshotTak
er.cs   152 13  IEScreenshots
Error   2   The best overloaded method match for 
'FlashSelenium.FlashSelenium.FlashSelenium(Selenium.ISelenium, string)' has 
some invalid 
arguments   D:\Aleksey\oDesk\IEScreenshots\IEScreenshots\ScreenshotTaker.cs 152 28
    IEScreenshots
Error   3   Argument 1: cannot convert from 'Selenium.ISelenium 
[d:\Aleksey\oDesk\IEScreenshots\Selenium-Dotnet-2.20.0\ThoughtWorks.Selenium.Cor
e.dll]' to 
'Selenium.ISelenium'    D:\Aleksey\oDesk\IEScreenshots\IEScreenshots\ScreenshotTake
r.cs    152 60  IEScreenshots

Original comment by aleksey....@gmail.com on 10 Apr 2012 at 9:20

GoogleCodeExporter commented 9 years ago
I am facing the Same issue when we follow the same steps
1. Create VS 2010 Project
2. Add references to all Selenium C# Client Drivers
3. Add reference to Silvernium-1.1.dll
4. Add the following code to Main: selenium = new DefaultSelenium("localhost", 
4444, "*firefox", "http://blah");
   selenium.Start();
   selenium.Open("http://blah");
   silvernium = new Silvernium(selenium, "blah");
5. Build

I dont why the example code given for Silvernium is not working. I copied the 
same thing and when i tried to build 3 errors encountered

Original comment by vikas.kr...@gmail.com on 12 Apr 2012 at 12:46

GoogleCodeExporter commented 9 years ago
I am facing the same problem too and have the exactly same error message like 
you guys.

I am trying to use FlashSelenium.
FlashSelenium.FlashSelenium flashApp = new FlashSelenium.FlashSelenium(s, 
"test"); 
The ISelenium s from ThoughtWorks.Selenium.Core.dll is different from what 
FlashSelenium.FlashSelenium(ISelenium x, string s) is looking for.
In other words, x and s are different objects even they have the same name.
Any help will be much appreciated.
Cheers.

Original comment by bw_will...@hotmail.com on 13 Apr 2012 at 3:13

GoogleCodeExporter commented 9 years ago
flash-selenium uses really old version of Selenium. you can download the 
"ThoughtWorks.Selenium.Core.dll" from here: 
http://code.google.com/p/flash-selenium/source/browse/
though that version requires old RC deploy
:(

Original comment by basda...@gmail.com on 13 Apr 2012 at 12:11

GoogleCodeExporter commented 9 years ago
Thanks for your  reply. 
I could not added the "ThoughtWorks.Selenium.Core.dll" as a reference into my 
project as it is not a .net based dll. 
I also tried to use NuGet to install from online and locally. and did not work. 

Can you please give me some help on this?
Very much appreciated.

Cheers.

Original comment by bw_will...@hotmail.com on 18 Apr 2012 at 11:47

GoogleCodeExporter commented 9 years ago
I am using the latest Selenium2.

OS: win7 
Visual Studio 2010 professional.

Here is a list of my References:
Microsoft.CSharp
nUnit.framework
Selenium.WebdriverBackedSelenium
Silvernium-1.1
SilverniumFixtures-0.4
ThougtWorks.Selenium.Core

/**** Using Statements *****/
using NUnit.Framework;
using Selenium;
using ThoughtWorks.Selenium.Silvernium;

I used the example script from the wiki.
Thanks a mil!
Damon

Original comment by MicMasu...@gmail.com on 9 May 2012 at 12:30

GoogleCodeExporter commented 9 years ago
Damon, thanks for you comment.  Are you saying you got this to work?  No build 
issues?  I have the same setup as you accept I installed on 2008 server.  I'm 
getting the above stated error.  I have the latest selenium2 and such.  

References:  The only references in my list:
Microsoft.CSharp
nUnit.framework
Selenium.WebdriverBackedSelenium
Silvernium-1.1
SilverniumFixtures-0.4
ThougtWorks.Selenium.Core

Here is the code from this link 
(http://code.google.com/p/silverlight-selenium/):
using NUnit.Framework;
using Selenium;
using ThoughtWorks.Selenium.Silvernium;

namespace IntegrationTests
{
    [TestFixture]
    public class SilverNibblesTest
    {
        private const string URL = "http://www.markheath.me.uk/silvernibbles";
        private const string OBJECTID = "SilverlightControl";
        private const string SCRIPTKEY = "SilverNibbles";
        private ISelenium selenium;
        private Silvernium silvernium;

        [SetUp]
        public void SetUp()
        {
            selenium = new DefaultSelenium("localhost", 4444, "*iexplore", URL);
            selenium.Start();
            selenium.Open(URL);
            silvernium = new Silvernium(selenium, OBJECTID, SCRIPTKEY);
        }

        [TearDown]
        public void TearDown()
        {
            selenium.Stop();
        }
        [Test]
        public void ShouldCommunicateWithSilverNibbleApplication()
        {
            Assert.AreEqual("SilverNibbles", selenium.GetTitle());
            // verifies default properties in the silverlight object
            Assert.AreEqual(640, silvernium.ActualWidth());
            Assert.AreEqual(460, silvernium.ActualHeight());

            // verifies user defined properties and methods
            // content.SilverNibbles.StartingSpeed;,  returns 5
            Assert.AreEqual("5", silvernium.GetPropertyValue("StartingSpeed"));
            // content.SilverNibbles.NewGame('1');,  returns null
            Assert.AreEqual("null", silvernium.Call("NewGame", "1"));

            // testing set and get for a user defined property
            Assert.AreEqual("5", silvernium.GetPropertyValue("StartingSpeed"));
            // setting the property
            silvernium.SetPropertyValue("StartingSpeed", "8");
            // getting it again
            Assert.AreEqual("8", silvernium.GetPropertyValue("StartingSpeed"));
        }
    }
}

****Results from build attempt***:
Error   1   The type 'Selenium.ISelenium' is defined in an assembly that is not 
referenced. You must add a reference to assembly 'ThoughtWorks.Selenium.Core, 
Version=0.0.0.0, Culture=neutral, 
PublicKeyToken=null'.   C:\data\projects\seltest\seltest\Program.cs 22  13  seltest

Error   2   The best overloaded method match for 
'ThoughtWorks.Selenium.Silvernium.Silvernium.Silvernium(Selenium.ISelenium, 
string, string)' has some invalid 
arguments   C:\data\projects\seltest\seltest\Program.cs 22  26  seltest

Error   3   Argument 1: cannot convert from 'Selenium.ISelenium 
[c:\installs\automation\selenium\selenium-dotnet-2.18.0\net40\ThoughtWorks.Selen
ium.Core.dll]' to 
'Selenium.ISelenium'    C:\data\projects\seltest\seltest\Program.cs 22  41  seltest

Any help would be very appreciated.

Original comment by punchbug...@gmail.com on 9 May 2012 at 10:45

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Though I didn't get above errors after loading SeleniumFixture.xaml,xaml.cs, 
WindowTracker.cs and its related reference files. I am getting other errors 
which are related to "Namespace" or Assembly cound not be found. Please look 
into this issue. Those might be version issues.

Original comment by rsouji...@gmail.com on 7 Jun 2012 at 2:46

GoogleCodeExporter commented 9 years ago
Anyone solved this problem? I am trying this out and can't seem to get it to 
work. Also getting the same Errors as above. Thanks

Original comment by law...@gmail.com on 27 Nov 2012 at 9:00

GoogleCodeExporter commented 9 years ago
You can grab the sources from here and build with the latest binaries 
"ThoughtWorks.Selenium.Core.dll".

If you reference in your project, the latest binary of selenium and your own 
compiled dll, it should work just fine.

Original comment by jegeheim...@gmail.com on 13 Dec 2012 at 10:05

GoogleCodeExporter commented 9 years ago
Sorry to ask, can you be more specific about grabbing the sources from here.  
Are there suggested ways to build?
So in essence click on the Source link above, use svn to get the code and build 
it.  Replace the "ThoughtWorks.Selenium.Core.dll" in the current install with 
the "ThoughtWorks.Selenium.Core.dll" that was built?

This sounds good.  Have you tried this on a setup that was having the problem?

Original comment by punchbug...@gmail.com on 18 Dec 2012 at 6:39

GoogleCodeExporter commented 9 years ago
Hi,
I am trying to use Silvernium Version 1.1 with ThoughtWorks.Selenium.Core 
version 1.1.4322. We have built a sample silverlight application and we are 
trying to access its elements through a Test Application built in C# using .NET 
Framework 4 and have added reference to Silvernium.

We have followed all the steps mentioned in the online tutorials and forums but 
we couldn't achieve the desired results. While executing the Test project 
developed in C#, we are getting the error given below:

Could not load file or assembly 'Silvernium, Version=1.0.4254.29979, 
Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system 
cannot find the file specified.

Can anybody help on resolving with this issue? 

We have already added following references and using statements to our project:

References added:
Silvernium-1.1
ThoughtWorks.Selenium.Core
ThoughtsWorks.Selenium.UnitTests
nunit.core
nunit.framework

Using Statements added: 
using System;
using Selenium;
using ThoughtWorks.Selenium.Silvernium;
using NUnit.Framework;

Quick turn around regarding this issue would be highly appreciated.

Thanks.

Original comment by nirmit.m...@gmail.com on 7 May 2013 at 2:30

GoogleCodeExporter commented 9 years ago
We are also facing the same problem as mentioned in the post above. For some 
reasons, Silvernium or its underlying dependencies are not found. I believe 
this is the only support group for Silenium. Has anyone found solution to it? 
It would be great if someone could share a small silverlight sample with a UI 
test.Thanks

Original comment by reachme....@gmail.com on 17 Feb 2014 at 4:30