Coder Social home page Coder Social logo

automatetheplanet / automatetheplanet-learning-series Goto Github PK

View Code? Open in Web Editor NEW
612.0 77.0 262.0 206.5 MB

Automate The Planet Series Source Code

License: Apache License 2.0

C# 63.94% Gherkin 0.11% JavaScript 14.23% HTML 7.12% CSS 0.04% Dockerfile 0.03% Java 13.28% Kotlin 0.77% Visual Basic .NET 0.48%

automatetheplanet-learning-series's Introduction

Welcome to the source code repository of Automate The Planet Learning Series!

Please STAR the repository.

This way, you will have a bookmark for easier access and you will show appreciation to our work!

Thank you for being an awesome supporter of the automation testing!

C# Series

Java Series

Under each folder, you will find a separate solution file. Every article from the series has its folder and an info file. To run the examples from particular series you need only its folder.

Running Tests through CLI

To execute your tests via command line in Continues Integration (CI), you can use the native .NET Core test runner.

  1. Navigate to the folder of your test project.
  2. Open the CMD there.
  3. Execute the following command:
dotnet test

For applying filters and other more advanced configuration check the official documentation https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test and https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-vstest.

Both MSTest and NUnit are supported.

Supported Code Editors

The recommended code editor for writing tests is Visual Studio 2019 or higher (preferably installed on Windows).

NOTE: After the support for .NET Core/.NET 5.0 and higher, Microsoft officially does not support .NET Core development in older versions of Visual Studio 2015, 2017 and so on.

Other Supported Editors:

  • Visual Studio Code
  • Visual Studio for Mac
  • Rider: Cross-platform .NET IDE

SDKs and Frameworks Prerequisites

.NET Core SDK 5 or higher (usually comes with Visual Studio installation or updates)

For desktop modules you need to download WinAppDriver. You need to make sure it is started before running any desktop tests.

For mobile modules you need to download and install Appium. You need to make sure it is started before running any mobile tests.

automatetheplanet-learning-series's People

Contributors

angelovstanton avatar islobodin avatar teo-nikolov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

automatetheplanet-learning-series's Issues

TakingHTML2CanvasFullPageScreenshot doesn´t work for me

string response = (string)js.ExecuteScript ("return (typeof canvasImgContentDecoded === 'undefined' || canvasImgContentDecoded === null)");

ERROR:
Additional information:
Can not convert an object of type 'System.Boolean' to type 'System.String'.

Issue with GettingStartedAppiumIOSMacOS

I am getting following error :
Class Initialization method GettingStartedAppiumIOSMacOS.AppiumTests.ClassInitialize threw exception. OpenQA.Selenium.WebDriverException: OpenQA.Selenium.WebDriverException: A exception with a null response was thrown sending an HTTP request to the remote WebDriver server for URL http://0.0.0.0:4723/wd/hub/session. The status of the exception was UnknownError, and the message was: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName ---> System.Net.WebException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName ---> System.Net.Http.HttpRequestException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName ---> System.ArgumentException: IPv4 address 0.0.0.0 and IPv6 address ::0 are unspecified addresses that cannot be used as a target address.
Parameter name: hostName.

How to use Explicity wait with IDriver?

new WebdriverWait cant be use

Tried, without success

public static T WaitUntil<T>(this IDriver driver, Func<IDriver, T> condition, TimeSpan timeout)
        {
            var wait = new DefaultWait<IDriver>(driver)
            {
                Timeout = timeout
            };

            return wait.Until(condition);
        }

GoButton.Click(); fails in HuddlePageObjectsAppDesignPattern of WebDriver-Series

First, thanks for such a vastly rich resources, @angelovstanton !

Persistent issue is in this part:
`

public override string Url => @"http://www.bing.com/";
public void Search(string textToType)
{
    SearchBox.Clear();
    SearchBox.SendKeys(textToType);
    GoButton.Click();
 }

`
Go Button does not become clickable as Click() throws
Result Message:
Test method HuddlePageObjectsElementsStringProperties.BingTests.UseApp_SearchTextInBing_UseElementsDirectly threw exception:
OpenQA.Selenium.ElementNotInteractableException: Element input id="sb_form_go" name="search" type="submit" could not be scrolled into view
Tried a few precautions before GoButton.Click(); like

var wait = new WebDriverWait(WrappedDriver, TimeSpan.FromSeconds(8)); wait.Until(ExpectedConditions.ElementExists(By.Id("sb_form_go"))); wait.Until(ExpectedConditions.ElementToBeClickable(By.Id("sb_form_go")));
while ElementExists condition is true, the ElementToBeClickable is never met.

Attached is packages.config.txt
I'd appreciate any advice!

Issues with running AppiumTests

i downloaded your appium sample for c# android and i'm getting these errors. googling doesn't reveal a quick solution. i think it is due to me upgrading the project to the latest version of all nuget packages. Although you haven't mentioned anything about that on your article

'DesiredCapabilities.DesiredCapabilities()' is obsolete: 'Use of DesiredCapabilities has been deprecated in favor of browser-specific Options classes' GettingStartedAppiumAndroidWindows D:\VSProjects\Appium-Series\Appium-Series\GettingStartedAppiumAndroidWindowsCSharp\AppiumTests.cs

on

var desiredCaps = new DesiredCapabilities();
            desiredCaps.SetCapability(MobileCapabilityType.DeviceName, "Android_Accelerated_x86_Oreo");
            desiredCaps.SetCapability(AndroidMobileCapabilityType.AppPackage, "io.appium.android.apis");
            desiredCaps.SetCapability(MobileCapabilityType.PlatformName, "Android");
            desiredCaps.SetCapability(MobileCapabilityType.PlatformVersion, "7.1");
            desiredCaps.SetCapability(AndroidMobileCapabilityType.AppActivity, ".ApiDemos");
            desiredCaps.SetCapability(MobileCapabilityType.App, testAppPath);

Argument 1: cannot convert from 'OpenQA.Selenium.Appium.Service.AppiumLocalService' to 'OpenQA.Selenium.Remote.ICommandExecutor' GettingStartedAppiumAndroidWindows D:\VSProjects\Appium-Series\Appium-Series\GettingStartedAppiumAndroidWindowsCSharp\AppiumTests.cs

and

Error CS1503 Argument 2: cannot convert from 'OpenQA.Selenium.Remote.DesiredCapabilities' to 'OpenQA.Selenium.DriverOptions' GettingStartedAppiumAndroidWindows D:\VSProjects\Appium-Series\Appium-Series\GettingStartedAppiumAndroidWindowsCSharp\AppiumTests.cs

on

_driver = new AndroidDriver<AndroidElement>(_appiumLocalService, desiredCaps);

There are multiple issues like this, should i just use the bundled package versions? is there no support on newer versions of appium?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.