TestProject Forum

I'm getting this error while uploading my published C# code

image

Please follow this guide to make sure your tests packaged correctly for upload process. C# - TestProject Documentation

what is the SDK version you are using ? legacy v1 or openSDK v2?

SDK version legacy v1

for V1, please make sure you following this for packaging C# - TestProject Documentation

Hello Mark,

Still I’m getting the same exception.

Hey Gokul, can you paste your test code here?

Hi Mark,

Below is the code

using System.Threading;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;
using ChromeDriver = TestProject.OpenSDK.Drivers.Web.ChromeDriver;

namespace MyFirstOpenSDK
{
public class ExampleTest
{
Stream Stream = new Stream();
public ChromeDriver Driver;

    [SetUp]
    public void Setup()
    {           
        Driver = new ChromeDriver(token: "MY DEV TOKEN", projectName: "My First C# Project", jobName: "My First C# Job");
      
    }

    [Test(Description = "Login")]
    public void Login()
    {
        Driver.Navigate().GoToUrl("My url ");

Driver.FindElement(By.XPath("//input[@name=‘userNameOrEmailAddress’]")).SendKeys(“User Name”);
Thread.Sleep(3000);
Driver.FindElement(By.XPath("//input[@name=‘password’]")).SendKeys(“password”);
Thread.Sleep(3000);
Driver.Report().Step(“Login Information provided”, screenshot: true);
Driver.FindElement(By.XPath("//div[contains(text(),‘Log In’)]")).Click();
Thread.Sleep(10000);
Driver.Report().Step(“Logged in successfully”, passed: Driver.FindElement(By.CssSelector("#dropdownMenuReference")).Displayed, screenshot: true);
}

    [TearDown]
    public void TearDown()
    {
        if (Driver != null)
            Driver.Quit();
    }
}

}

Hello @gokul
That code is written in the new Open SDK, the uploading of the new C# open sdk will be added soon.

@ran.tzur thanks for your information. if i changed into old it will work…?

Yes, but you will need to change the code as the old SDK usees different interfaces and annotation.
There is no need for that, the upload feature has been tested and will be released in the coming days.

Just to update, it has been released, yoy can try uploading the code now, just make sure to check the packaging section in the git of the OpenSdk before you upload the code.

ok thanks. I couldn’t able to use the explicit wait in the TestProject driver, we have any solution for that…?

@ran.tzur @Mark_K Hi mark, tzur ran,

I got new issues with test platform dll’s. below is the snapshot:
image

these dll’s got published in my code but again I’m getting this error.

Did you zip and upload the entire published folder?

Yes i zipped the entire published code.

Can you please send the zip file to support@testproject.io

Yes. I sent my file from thamizharasu@skalabletech.com this mail id.
Sub to ref : Error while uploading the published code

I did not receive the email, please try sending it again, make sure you see it in Sent.

I’ve shared my drive document