WarningShoot
WarningShoot
CC#
Created by WarningShoot on 7/10/2024 in #help
Appium error
Hey, i want to write some ui tests using appium but i got some weird error
using OpenQA.Selenium;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Android;
using OpenQA.Selenium.Appium.Enums;

namespace appiumtest;

public class Tests
{
private AndroidDriver _driver;

[OneTimeSetUp]
public void SetUp()
{
var serverUri = new Uri(Environment.GetEnvironmentVariable("APPIUM_HOST") ?? "http://127.0.0.1:4723/");
var driverOptions = new AppiumOptions() {
AutomationName = AutomationName.AndroidUIAutomator2,
PlatformName = "Android",
DeviceName = "Android Emulator",
};

driverOptions.AddAdditionalAppiumOption("appPackage", "com.android.settings");
driverOptions.AddAdditionalAppiumOption("appActivity", ".Settings");
// NoReset assumes the app com.google.android is preinstalled on the emulator
driverOptions.AddAdditionalAppiumOption("noReset", true);

_driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
}

[OneTimeTearDown]
public void TearDown()
{
_driver.Dispose();
}

[Test]
public void TestBattery()
{
_driver.StartActivity("com.android.settings", ".Settings");
_driver.FindElement(By.XPath("//*[@text='Battery']")).Click();
}
}
using OpenQA.Selenium;
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Android;
using OpenQA.Selenium.Appium.Enums;

namespace appiumtest;

public class Tests
{
private AndroidDriver _driver;

[OneTimeSetUp]
public void SetUp()
{
var serverUri = new Uri(Environment.GetEnvironmentVariable("APPIUM_HOST") ?? "http://127.0.0.1:4723/");
var driverOptions = new AppiumOptions() {
AutomationName = AutomationName.AndroidUIAutomator2,
PlatformName = "Android",
DeviceName = "Android Emulator",
};

driverOptions.AddAdditionalAppiumOption("appPackage", "com.android.settings");
driverOptions.AddAdditionalAppiumOption("appActivity", ".Settings");
// NoReset assumes the app com.google.android is preinstalled on the emulator
driverOptions.AddAdditionalAppiumOption("noReset", true);

_driver = new AndroidDriver(serverUri, driverOptions, TimeSpan.FromSeconds(180));
_driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(10);
}

[OneTimeTearDown]
public void TearDown()
{
_driver.Dispose();
}

[Test]
public void TestBattery()
{
_driver.StartActivity("com.android.settings", ".Settings");
_driver.FindElement(By.XPath("//*[@text='Battery']")).Click();
}
}
code is basically from docs and throws error at creating instance of AndroidDriver
appiumtest.AppiumTests.TestBattery

OneTimeSetUp: System.TypeLoadException : Method 'ExecuteAsync' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'Appium.Net, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Exception doesn't have a stacktrace
appiumtest.AppiumTests.TestBattery

OneTimeSetUp: System.TypeLoadException : Method 'ExecuteAsync' in type 'OpenQA.Selenium.Appium.Service.AppiumCommandExecutor' from assembly 'Appium.Net, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.
Exception doesn't have a stacktrace
What could be the issue and how to solve it?
2 replies
CC#
Created by WarningShoot on 5/15/2024 in #help
Creating pipeline with selenium specflow
Hey, what I want to do is frontend tests in my pipeline on azure DevOps with local agent. Here is what I got for now: 1. Restore nugget 2.Build 3.Publish 4.Publish artifacts 5.Selenium Test It's working good but problem is I don't know how to host my application in pipeline. I want it to look like this 1. Restore nugget 2.Build 3.Publish 4.Publish artifacts 5.host application and wait until it's fully started (it can be in specific time like 30s) after it move on with server hosted 6.Selenium Test 7. Stop application
4 replies
CC#
Created by WarningShoot on 10/19/2023 in #help
❔ Ef core relations
No description
26 replies
CC#
Created by WarningShoot on 9/7/2023 in #help
❔ SignalR
4 replies
CC#
Created by WarningShoot on 9/4/2023 in #help
❔ Docker.DotNet nuget help
I want to create container using this nuget but how im supposed to pass arguments into this.
var container = await client.Containers.CreateContainerAsync(new CreateContainerParameters()
{
Image = "postgres",
Name = containerName,
OnBuild = new[] { "-p 7654:5432", "-e POSTGRES_PASSWORD=password" }
});
var container = await client.Containers.CreateContainerAsync(new CreateContainerParameters()
{
Image = "postgres",
Name = containerName,
OnBuild = new[] { "-p 7654:5432", "-e POSTGRES_PASSWORD=password" }
});
I know this OnBuild is wrong, i need to pass this arguments to start working with it
10 replies
CC#
Created by WarningShoot on 7/11/2023 in #help
❔ Linking folder from one project to another
Hi, i wanted to link folder from one project to another i accomplished it but i can't create new files in linked folder is there any way around it?
8 replies