/// <summary> /// Opens a new Internet Explorer and navigates to the given <paramref name="url"/>. /// </summary> /// <param name="url">The Url to open</param> /// <param name="logonDialogHandler">A <see cref="LogonDialogHandler"/> class instanciated with the logon credentials.</param> /// <param name="createInNewProcess">if set to <c>true</c> the IE instance is created in a new process.</param> /// <remarks> /// You could also use one of the overloaded constructors. /// </remarks> /// <example> /// The following example creates a new Internet Explorer instances and navigates to /// the WatiN Project website on SourceForge leaving the created Internet Explorer open. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public WatiNWebsite() /// { /// LogonDialogHandler logon = new LogonDialogHandler("username", "password"); /// IE ie = new IE("http://watin.sourceforge.net", logon); /// } /// } /// } /// </code> /// </example> public IE(string url, LogonDialogHandler logonDialogHandler, bool createInNewProcess) { CreateNewIEAndGoToUri(UtilityClass.CreateUri(url), logonDialogHandler, createInNewProcess); }
/// <summary> /// Initializes a new instance of the <see cref="FireFox"/> class. /// </summary> /// <param name="url">The url to go to</param> public FireFox(string url) : this(UtilityClass.CreateUri(url)) { }
/// <summary> /// Opens a new Internet Explorer and navigates to the given <paramref name="url"/>. /// </summary> /// <param name="url">The Url to open</param> /// <param name="logonDialogHandler">A <see cref="LogonDialogHandler"/> class instanciated with the logon credentials.</param> /// <remarks> /// You could also use one of the overloaded constructors. /// </remarks> /// <example> /// The following example creates a new Internet Explorer instances and navigates to /// the WatiN Project website on SourceForge leaving the created Internet Explorer open. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public WatiNWebsite() /// { /// LogonDialogHandler logon = new LogonDialogHandler("username", "password"); /// IE ie = new IE("http://watin.sourceforge.net", logon); /// } /// } /// } /// </code> /// </example> public IE(string url, LogonDialogHandler logonDialogHandler) { CreateNewIEAndGoToUri(UtilityClass.CreateUri(url), logonDialogHandler, false); }
/// <summary> /// Opens a new Internet Explorer and navigates to the given <paramref name="url"/>. /// <note> /// When the <see cref="WatiN.Core.IE" /> /// instance is destroyed the created Internet Explorer window will also be closed. /// </note> /// </summary> /// <param name="url">The URL to open</param> /// <param name="createInNewProcess">if set to <c>true</c> the IE instance is created in a new process.</param> /// <remarks> /// You could also use one of the overloaded constructors. /// </remarks> /// <example> /// The following example creates a new Internet Explorer instances and navigates to /// the WatiN Project website on SourceForge. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public OpenWatiNWebsite() /// { /// IE ie = new IE("http://watin.sourceforge.net"); /// } /// } /// } /// </code> /// </example> public IE(string url, bool createInNewProcess) { CreateNewIEAndGoToUri(UtilityClass.CreateUri(url), null, createInNewProcess); }
/// <summary> /// Opens a new Internet Explorer and navigates to the given <paramref name="url"/>. /// <note> /// When the <see cref="WatiN.Core.IE" /> /// instance is destroyed the created Internet Explorer window will also be closed. /// </note> /// </summary> /// <param name="url">The URL to open</param> /// <remarks> /// You could also use one of the overloaded constructors. /// </remarks> /// <example> /// The following example creates a new Internet Explorer instances and navigates to /// the WatiN Project website on SourceForge. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public OpenWatiNWebsite() /// { /// IE ie = new IE("http://watin.sourceforge.net"); /// } /// } /// } /// </code> /// </example> public IE(string url) { CreateNewIEAndGoToUri(UtilityClass.CreateUri(url), null, false); }
/// <summary> /// Navigates Internet Explorer to the given <paramref name="url" />. /// </summary> /// <param name="url">The URL to GoTo.</param> /// <example> /// The following example creates a new Internet Explorer instance and navigates to /// the WatiN Project website on SourceForge. /// <code> /// using WatiN.Core; /// /// namespace NewIEExample /// { /// public class WatiNWebsite /// { /// public WatiNWebsite() /// { /// IE ie = new IE(); /// ie.GoTo("http://watin.sourceforge.net"); /// } /// } /// } /// </code> /// </example> public virtual void GoTo(string url) { GoTo(UtilityClass.CreateUri(url)); }
/// <summary> /// Finds an element, frame, IE instance or HTMLDialog by its Url. /// </summary> /// <param name="url">The well-formed url to find.</param> /// <param name="ignoreQuery">Set to true to ignore querystring when matching.</param> /// <returns><see cref="AttributeConstraint" /></returns> /// <example> /// <code>ie.Link(Find.ByUrl("http://watin.sourceforge.net", true)).Url</code> /// </example> public static AttributeConstraint ByUrl(string url, bool ignoreQuery) { return(ByUrl(UtilityClass.CreateUri(url), ignoreQuery)); }