How to select the Chrome context menu option in Ranorex
File: SelectContextMenuOption.UserCode.cs
using System; using System.Collections.Generic; using System.Text; using System.Text.RegularExpressions; using System.Drawing; using System.Threading; using WinForms = System.Windows.Forms; using Ranorex; using Ranorex.Core; using Ranorex.Core.Repository; using Ranorex.Core.Testing; using System.Diagnostics; namespace GlobalProjects { public partial class SelectContextMenuOption { private void Init() { KodingWindowLogin(); } public void KodingWindowLogin() { Process.Start("chrome.exe","https://kodingwindow.com/testapp/"); repo.KodingWindow.Username.Value = "kodingwindow"; repo.KodingWindow.Username.Click(); repo.KodingWindow.Username.DoubleClick(); Mouse.Click(WinForms.MouseButtons.Right); Delay.Duration(200); foreach(MenuItem mi in repo.MenuBar.Items) { Report.Info(mi.Text); } foreach(MenuItem mi in repo.MenuBar.Items) { if(mi.Text.Equals("Copy Ctrl+C")) { mi.EnsureVisible(); mi.MoveTo(); mi.Click(); break; } } repo.KodingWindow.Password.PressKeys("{LControlKey down}{Vkey}{LControlKey up}"); Delay.Duration(100); repo.KodingWindow.Login.Click(); } } }
Comments and Reactions
What Next?
How to compare the Excel sheets using Interop objects in Ranorex
How to create, insert and save the Excel in Ranorex
How to read the Excel specific row and column data in Ranorex
Advertisement