Skip to content
This repository has been archived by the owner on May 7, 2018. It is now read-only.

Commit

Permalink
Update to NuGet 1.0.8
Browse files Browse the repository at this point in the history
  • Loading branch information
tfreitasleal committed Oct 26, 2017
1 parent 9a942ed commit 221dd70
Show file tree
Hide file tree
Showing 14 changed files with 123 additions and 148 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

WebDriver testing support for qooxdoo desktop and mobile applications.

Version 1.0.7 is available on [NuGet](https://www.nuget.org/packages/Qooxdoo-WebDriver/) as __Qooxdoo-WebDriver__. This release is NET 4.5 only.
Version 1.0.8 is available on [NuGet](https://www.nuget.org/packages/Qooxdoo-WebDriver/) as __Qooxdoo-WebDriver__. This release is NET 4.5 only.

The SimpleDemo sample uses Chrome, Edge, Firefox and Opera (Internet Explorer isn't planned). It includes test projects for NUnit and MSTest. It also includes an "How to run.txt" to make your life easier.

Expand Down
18 changes: 10 additions & 8 deletions Samples/SimpleDemo/SimpleDemo.Tests/ApiViewerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ namespace SimpleDemo.Tests
{
public static class ApiViewerTests
{
public static void A01_ClickSearch(QxWebDriver driver)
public static QxWebDriver Driver;

public static void A01_ClickSearch()
{
// Find the 'Search' button in the tool bar
// @label is the button text
OpenQA.Selenium.By buttonByLabel = By.Qxh("apiviewer.Viewer/*/[@label=Search]");
IWidget buttonWidget = driver.FindWidget(buttonByLabel);
IWidget buttonWidget = Driver.FindWidget(buttonByLabel);

// Click the button if it's not already selected
if (!buttonWidget.Selected)
Expand All @@ -21,33 +23,33 @@ public static void A01_ClickSearch(QxWebDriver driver)
}
}

public static void A02_ClickLegend(QxWebDriver driver)
public static void A02_ClickLegend()
{
// Now click the 'Legend' button
OpenQA.Selenium.By buttonByLabel = By.Qxh("apiviewer.Viewer/*/[@label=Legend]");
IWidget buttonWidget = driver.FindWidget(buttonByLabel);
IWidget buttonWidget = Driver.FindWidget(buttonByLabel);
if (!buttonWidget.Selected)
{
buttonWidget.Click();
}
}

public static void A03_ClickContent(QxWebDriver driver)
public static void A03_ClickContent()
{
// Now click the 'Content' button
OpenQA.Selenium.By buttonByLabel = By.Qxh("apiviewer.Viewer/*/[@label=Content]");
IWidget buttonWidget = driver.FindWidget(buttonByLabel);
IWidget buttonWidget = Driver.FindWidget(buttonByLabel);
if (!buttonWidget.Selected)
{
buttonWidget.Click();
}
}

public static void A04_ClickTreeItem(QxWebDriver driver)
public static void A04_ClickTreeItem()
{
// Select the "data" item from the package tree
OpenQA.Selenium.By tree = By.Qxh("apiviewer.Viewer/*/apiviewer.ui.PackageTree");
ISelectable packageTree = (ISelectable) driver.FindWidget(tree);
ISelectable packageTree = (ISelectable) Driver.FindWidget(tree);
packageTree.SelectItem("data");

Thread.Sleep(Wait.Duration);
Expand Down
18 changes: 7 additions & 11 deletions Samples/SimpleDemo/SimpleDemo.Tests/ChromeApiViewer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using Qooxdoo.WebDriver;

namespace SimpleDemo.Tests
Expand All @@ -9,16 +7,14 @@ namespace SimpleDemo.Tests
[Parallelizable(ParallelScope.None)]
public class ChromeApiViewer
{
private static IWebDriver _internalWebDriver;

public static QxWebDriver Driver;

[OneTimeSetUp]
public void Setup()
{
_internalWebDriver = new ChromeDriver();
_internalWebDriver.Manage().Window.Maximize();
Driver = new QxWebDriver(_internalWebDriver);
Driver = new QxWebDriver(Browser.Chrome);
Driver.Manage().Window.Maximize();
ApiViewerTests.Driver = Driver;
Driver.Url = "http://www.qooxdoo.org/current/api/index.html";
}

Expand All @@ -33,28 +29,28 @@ public void TearDown()
[Order(1010)]
public void A01_ClickSearch()
{
ApiViewerTests.A01_ClickSearch(Driver);
ApiViewerTests.A01_ClickSearch();
}

[Test]
[Order(1020)]
public void A02_ClickLegend()
{
ApiViewerTests.A02_ClickLegend(Driver);
ApiViewerTests.A02_ClickLegend();
}

[Test]
[Order(1030)]
public void A03_ClickContent()
{
ApiViewerTests.A03_ClickContent(Driver);
ApiViewerTests.A03_ClickContent();
}

[Test]
[Order(1040)]
public void A04_ClickTreeItem()
{
ApiViewerTests.A04_ClickTreeItem(Driver);
ApiViewerTests.A04_ClickTreeItem();
}
}
}
31 changes: 14 additions & 17 deletions Samples/SimpleDemo/SimpleDemo.Tests/ChromeWisej.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using OpenQA.Selenium.Support.UI;
using Qooxdoo.WebDriver;

Expand All @@ -10,17 +8,15 @@ namespace SimpleDemo.Tests
[Parallelizable(ParallelScope.None)]
public class ChromeWisej
{
private static IWebDriver _internalWebDriver;

public static QxWebDriver Driver;

[OneTimeSetUp]
public void Setup()
{
_internalWebDriver = new ChromeDriver();
_internalWebDriver.Manage().Window.Maximize();
Driver = new QxWebDriver(_internalWebDriver);
Driver = new QxWebDriver(Browser.Chrome);
Driver.Manage().Window.Maximize();
Cache.Clear();
WisejTests.Driver = Driver;
#if !DEBUGJS
Driver.Url = "http://localhost:16461/Default.html";
#else
Expand All @@ -33,77 +29,78 @@ public void TearDown()
{
Driver.Quit();
Driver.Dispose();
Driver = null;
}

[Test]
[Order(1050)]
public void W01_AskQuitNo()
{
ExpectedConditions.TitleIs("Main Page");
WisejTests.W01_AskQuitNo(Driver);
WisejTests.W01_AskQuitNo();
}

[Test]
[Order(1060)]
public void W02_MainPage_customerEditor_Click()
{
WisejTests.W02_MainPage_customerEditor_Click(Driver);
WisejTests.W02_MainPage_customerEditor_Click();
}

[Test]
[Order(1070)]
public void W03_ButtonsWindow_customerEditor_Click()
{
WisejTests.W03_ButtonsWindow_customerEditor_Click(Driver);
WisejTests.W03_ButtonsWindow_customerEditor_Click();
}

[Test]
[Order(1080)]
public void W04_CustomerEditor_customerEditor_LabelContents()
{
WisejTests.W04_CustomerEditor_customerEditor_LabelContents(Driver);
WisejTests.W04_CustomerEditor_customerEditor_LabelContents();
}

[Test]
[Order(1090)]
public void W05_CloseWindow()
{
WisejTests.W05_CloseWindow(Driver);
WisejTests.W05_CloseWindow();
}

[Test]
[Order(1100)]
public void W06_MainPage_customerEditor_Click()
{
WisejTests.W06_MainPage_customerEditor_Click(Driver);
WisejTests.W06_MainPage_customerEditor_Click();
}

[Test]
[Order(1110)]
public void W07_ButtonsWindow_supplierEditor_Click()
{
WisejTests.W07_ButtonsWindow_supplierEditor_Click(Driver);
WisejTests.W07_ButtonsWindow_supplierEditor_Click();
}

[Test]
[Order(1120)]
public void W08_CustomerEditor_customerEditor_LabelContents()
{
WisejTests.W08_CustomerEditor_customerEditor_LabelContents(Driver);
WisejTests.W08_CustomerEditor_customerEditor_LabelContents();
}

[Test]
[Order(1130)]
public void W09_CloseWindow()
{
WisejTests.W09_CloseWindow(Driver);
WisejTests.W09_CloseWindow();
}

[Test]
[Order(1140)]
public void W10_AskQuitYes()
{
WisejTests.W10_AskQuitYes(Driver);
WisejTests.W10_AskQuitYes();
}
}
}
18 changes: 7 additions & 11 deletions Samples/SimpleDemo/SimpleDemo.Tests/EdgeApiViewer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Edge;
using Qooxdoo.WebDriver;

namespace SimpleDemo.Tests
Expand All @@ -9,16 +7,14 @@ namespace SimpleDemo.Tests
[Parallelizable(ParallelScope.None)]
public class EdgeApiViewer
{
private static IWebDriver _internalWebDriver;

public static QxWebDriver Driver;

[OneTimeSetUp]
public void Setup()
{
_internalWebDriver = new EdgeDriver();
_internalWebDriver.Manage().Window.Maximize();
Driver = new QxWebDriver(_internalWebDriver);
Driver = new QxWebDriver(Browser.Edge);
Driver.Manage().Window.Maximize();
ApiViewerTests.Driver = Driver;
Driver.Url = "http://www.qooxdoo.org/current/api/index.html";
}

Expand All @@ -33,28 +29,28 @@ public void TearDown()
[Order(2010)]
public void A01_ClickSearch()
{
ApiViewerTests.A01_ClickSearch(Driver);
ApiViewerTests.A01_ClickSearch();
}

[Test]
[Order(2020)]
public void A02_ClickLegend()
{
ApiViewerTests.A02_ClickLegend(Driver);
ApiViewerTests.A02_ClickLegend();
}

[Test]
[Order(2030)]
public void A03_ClickContent()
{
ApiViewerTests.A03_ClickContent(Driver);
ApiViewerTests.A03_ClickContent();
}

[Test]
[Order(2040)]
public void A04_ClickTreeItem()
{
ApiViewerTests.A04_ClickTreeItem(Driver);
ApiViewerTests.A04_ClickTreeItem();
}
}
}
Loading

0 comments on commit 221dd70

Please sign in to comment.