How to integrate White into visual studio

Jun 29, 2009 at 4:37 PM

I'm a new white user and I'm using visual studio test edition. should I reference only white.core.dll in my test project or should I referene both core.dll and White.NUnit.dll? I think that I really need a simple starter walk through. I would really appreciate your help.

Jun 30, 2009 at 6:57 AM

You reference white.core.dll, White.Nunit.dll and nunit.framework.dll

 

Throndorin

 

 

 

 

Jun 30, 2009 at 5:40 PM

Thank you very much. Another question:

When I try to use CustomUIItem, my compiler doesn't recognize [ControlTypeMapping(CustomUIItemType.Pane)], what else should I reference? where can I find some white test sample code?

        [ControlTypeMapping(CustomUIItemType.Pane)]
        public class MyDateUIItem : CustomUIItem
        {
            // Implement these two constructors. The order of parameters should be same.
            public MyDateUIItem(AutomationElement automationElement, ActionListener actionListener)
                : base(automationElement, actionListener)
            {
            }

            //Empty constructor is mandatory with protected or public access modifier.
            protected MyDateUIItem() { }

            //Sample method
            public virtual void EnterDate(DateTime dateTime)
            {
                //Base class, i.e. CustomUIItem has property called Container. Use this find the items within this.
                //Can also use SearchCriteria for find items
                Container.Get<TextBox>("day").Text = dateTime.Day.ToString();
                Container.Get<TextBox>("month").Text = dateTime.Month.ToString();
                Container.Get<TextBox>("year").Text = dateTime.Year.ToString();
            }
        }

Jul 1, 2009 at 7:31 AM
Edited Jul 1, 2009 at 7:32 AM

mmh, I has no problems

works as expected, you need    
"using Core.UIItems.Custom;"


as you can see this element is part of the White.Core.dll


this works for me:

 

using Core.UIItems.Custom;

namespace ManufacturerToolTest.Check
{
  [ControlTypeMapping(CustomUIItemType.Pane)]
  public class MyDateUIItem : CustomUIItem
  {
   
  }
}

 

which version of white do you use?

Jul 2, 2009 at 12:31 PM

Hi I am also a new white user, need to know which project should i start with like, console application or windows application.

if we choose windows application then it creates problem for application class, which is present core.Application as well as in System.Windows.Forms

please suggest how should we resolve this... 

Thanks...

 

Jul 2, 2009 at 9:27 PM

I do need include Core.UIItems.Custom, thanks a lot.

Jul 3, 2009 at 12:56 PM
<abbr />
<input id="ctl00_ctl00_MasterContent_Content_PostRepeater_ctl08_PostId" name="ctl00$ctl00$MasterContent$Content$PostRepeater$ctl08$PostId" type="hidden" value="207894" />

Hi I am also a new white user, need to know which project should i start with like, console application or windows application.

if we choose windows application then it creates problem for application class, which is present core.Application as well as in System.Windows.Forms

please suggest how should we resolve this... 

Thanks...

 private Core.Application whiteApplication;
 private System.Windows.Forms.Application windowsApplication;

 

instead of Application so you can use both.

 

 

 

 

 

Jul 7, 2009 at 7:01 PM
Edited Jul 14, 2009 at 5:13 PM

Hi, Throndorin, I'm using visual studio test edition which already has a test platform, should I still include White.Nunit.dll and nunit.framework.dll?

Jul 8, 2009 at 8:11 AM

@timjiang

I have no experience using this version of Visual Studio, but my first gues is yes you should. The reason:

I think White.Nunit.dll and nunit.framework.dll are balanced so they should used together.

I don't think that the test edition comes with white.

And you can use newer versions from white as you want.

Without better ideas I would say the VS Version comes with own solutions for testing.

 

Maybe someone of the white team has more informations.

 

Throndorin