You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I launched the program, and after clicking a button, a new window popped up where I must enter the password and press Enter. I've been working on this for two weeks and don't know how to handle it. Also, after upgrading Selenium to version 4.0, I cannot launch this. Can somebody please help me with this? Make corrections if necessary.
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Enums;
using OpenQA.Selenium.Appium.Windows;
using OpenQA.Selenium.Remote;
using System;
using System.Diagnostics;
using System.Threading;
using System.Collections.ObjectModel;
using Microsoft.VisualBasic;
using OpenQA.Selenium;
using System.Runtime.CompilerServices;
using OpenQA.Selenium.Support.UI;
using System.Text.RegularExpressions;
class Program
{
public static void Main(string[] args)
{
// Start WinAppDriver process
//Process.Start(@"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe");
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app","Root");
options.AddAdditionalCapability("app", @"C:\Program Files (x86)\InsLauncher.exe");
options.AddAdditionalCapability("deviceName", "SERWER");
options.AddAdditionalCapability("appArguments", "N/R");
WindowsDriver<WindowsElement> driver = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), options);
driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(7);
var podmiot = driver.FindElementByXPath("//Window[@ClassName=\'Window\'][@Name=\'R\']/Custom[@ClassName=\'SelectDatabasesControl\']/Custom[@AutomationId=\'BazaPodmiotu\']/ComboBox[@AutomationId=\'cbxBaza\']");
podmiot.SendKeys(" B");
podmiot.SendKeys(Keys.Enter);
var aktualizujAndRun = driver.FindElementByXPath("//Button[@Name=\'Aktualizuj i uruchom\'][@AutomationId='btnAktualizujIUruchom']");
aktualizujAndRun.Click();
Thread.Sleep(5000);
AppiumOptions upp = null;
WindowsDriver<WindowsElement> secondDriver = null;
Console.WriteLine("TUTAJ");
var listofAllWindow = driver.FindElementsByXPath("//Window");
string s="Aktualizacja podmiotu";
foreach(var w in listofAllWindow)
{
Console.WriteLine($"{w.Text}");
if( w.Displayed && w.Text.Contains("Aktualizuj"))
{
var windowHandle = w.GetAttribute("NativeWindowHandle");
Console.WriteLine($"Window Handle: {windowHandle}");
var handleInt = (int.Parse(windowHandle)).ToString("x");
upp = new AppiumOptions();
upp.AddAdditionalCapability("appTopLevelWindow", handleInt);
break;
}
}
if (upp != null){
secondDriver = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), upp);
secondDriver.Keyboard.SendKeys(Keys.Escape);
secondDriver.Keyboard.SendKeys("2*2"+ Keys.Enter);
}
Thread.Sleep(10000);
//driver.CloseApp();
driver.Quit();
}
The text was updated successfully, but these errors were encountered:
I launched the program, and after clicking a button, a new window popped up where I must enter the password and press Enter. I've been working on this for two weeks and don't know how to handle it. Also, after upgrading Selenium to version 4.0, I cannot launch this. Can somebody please help me with this? Make corrections if necessary.
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.Enums;
using OpenQA.Selenium.Appium.Windows;
using OpenQA.Selenium.Remote;
using System;
using System.Diagnostics;
using System.Threading;
using System.Collections.ObjectModel;
using Microsoft.VisualBasic;
using OpenQA.Selenium;
using System.Runtime.CompilerServices;
using OpenQA.Selenium.Support.UI;
using System.Text.RegularExpressions;
class Program
{
public static void Main(string[] args)
{
// Start WinAppDriver process
//Process.Start(@"C:\Program Files (x86)\Windows Application Driver\WinAppDriver.exe");
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("app","Root");
options.AddAdditionalCapability("app", @"C:\Program Files (x86)\InsLauncher.exe");
options.AddAdditionalCapability("deviceName", "SERWER");
options.AddAdditionalCapability("appArguments", "N/R");
The text was updated successfully, but these errors were encountered: