Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions Appium Wizard/Database.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,6 @@ public static void InsertDataIntoDevicesTable(string Name, string OS, string Ver
}
}

public static void UpdateDataInDevicesTable(string Name, string OS, string Version, string Status, string UDID, int Width, int Height, string ConnectionType, string IPAddress)
{
using (SQLiteConnection connection = new SQLiteConnection(connectionString))
{
connection.Open();
using (SQLiteCommand command = new SQLiteCommand(connection))
{
command.CommandText = "UPDATE Devices SET OS = '" + OS + "', Version = '" + Version + "', Status = '" + Status + "', Width = '" + Width + "', Height = '" + Height + "', Connection = '" + ConnectionType + "', IPAddress = '" + IPAddress + "' WHERE UDID = '" + UDID + "'";
command.ExecuteNonQuery();
}
connection.Close();
}
}

public static void UpdateDataInDevicesTable(string UDID, string key, string value)
{
Expand Down
4 changes: 2 additions & 2 deletions Appium Wizard/MainScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1775,9 +1775,9 @@ private async void takeScreenshotToolStripMenuItem_Click(object sender, EventArg
if (saveFileDialog.FileName != "")
{
CommonProgress commonProgress = new CommonProgress();
commonProgress.UpdateStepLabel("Take Screenshot", "Please wait while taking screenshot of " + selectedDeviceName + "...");
commonProgress.Owner = this;
commonProgress.Show();
commonProgress.UpdateStepLabel("Take Screenshot", "Please wait while taking screenshot of " + selectedDeviceName + "...");
string filePath = saveFileDialog.FileName;
try
{
Expand Down Expand Up @@ -1808,9 +1808,9 @@ await Task.Run(() =>
if (saveFileDialog.FileName != "")
{
CommonProgress commonProgress = new CommonProgress();
commonProgress.UpdateStepLabel("Take Screenshot", "Please wait while taking screenshot of " + selectedDeviceName + "...");
commonProgress.Owner = this;
commonProgress.Show();
commonProgress.UpdateStepLabel("Take Screenshot", "Please wait while taking screenshot of " + selectedDeviceName + "...");
string filePath = saveFileDialog.FileName;
filePath = "\"" + filePath + "\"";
try
Expand Down
Binary file modified Appium Wizard/Resources/Executables/iOSServer.exe
Binary file not shown.
21 changes: 20 additions & 1 deletion Appium Wizard/USBWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
private ManagementEventWatcher connectWatcher;
private ManagementEventWatcher disconnectWatcher;
ListView listView1;
public USBWatcher(ListView listview)

Check warning on line 11 in Appium Wizard/USBWatcher.cs

View workflow job for this annotation

GitHub Actions / build (Release)

Non-nullable field 'connectWatcher' must contain a non-null value when exiting constructor. Consider adding the 'required' modifier or declaring the field as nullable.
{
this.listView1 = listview;
}
Expand Down Expand Up @@ -61,14 +61,33 @@
string udidFromList = Regex.Replace(item.SubItems[4].Text, "[^a-zA-Z0-9]", "");
if (udidFromList.Equals(deviceId, StringComparison.InvariantCultureIgnoreCase))
{
string OS = item.SubItems[2].Text;
string udid = item.SubItems[4].Text;
string OS = item.SubItems[2].Text;
string version = item.SubItems[1].Text;
await Task.Run(() =>
{
if (OS.Equals("iOS"))
{
var deviceInfo = iOSMethods.GetInstance().GetDeviceInformation(udid);
version = deviceInfo["ProductVersion"]?.ToString() ?? "";
}
else
{
var deviceInfo = AndroidAsyncMethods.GetInstance().GetDeviceInformation(udid);
if (deviceInfo.ContainsKey("ro.build.version.release"))
{
version = deviceInfo["ro.build.version.release"]?.ToString() ?? "";
}
}
});

string deviceName = item.SubItems[0].Text;
string OSVersion = OS + " " + version;
item.SubItems[3].Text = "Online";
item.SubItems[5].Text = "USB";
Database.UpdateDataInDevicesTable(udid, "Version", version);
Database.UpdateDataInDevicesTable(udid, "Connection", "USB");
MainScreen.main?.RefreshDeviceListView();
if (MainScreen.DeviceConnectedNotification)
{
Common.ShowNotification("Device Connected", deviceName + " connected.");
Expand Down
Loading