Code: Select all
string imgText = urgencyIndicator.GetAttributeValue<string>("Src"); -> to get value using attribute value
Code: Select all
InputTag input = tableSearchCriteria_OCoEFileNet.FindSingle("//td[@innertext='"+fieldName+"']/parent::tr/td[5]/input"); -> from parent to child
pathDirectoryToSaveFileNETPDF.PressKeys("{END}{SHIFT DOWN}{HOME}{SHIFT UP}{DELETE}"); -> to delete content from text box
pathDirectoryToSaveFileNETPDF.TagValue=path; ->assigning value in text field
Ranorex.THeadTag thtHeader = datePicker.FindDescendant<Ranorex.THeadTag>("calDaysHeader");
Ranorex.TdTag btnPreviousMonth = thtHeader.FindDescendant<Ranorex.TdTag>("previousMonth");
Ranorex.TdTag btnNextMonth = thtHeader.FindDescendant<Ranorex.TdTag>("nextMonth");
Ranorex.TdTag tdMonth = thtHeader.FindDescendant<Ranorex.TdTag>("calMonthCell");
Ranorex.TdTag btnPreviousYear = thtHeader.FindDescendant<Ranorex.TdTag>("previousYear");
Ranorex.TdTag btnNextYear = thtHeader.FindDescendant<Ranorex.TdTag>("nextYear");
Ranorex.TdTag tdYear = thtHeader.FindDescendant<Ranorex.TdTag>("calYearCell");
Ranorex.TBodyTag tbCalendarBody = datePicker.FindDescendant<Ranorex.TBodyTag>("controlCalBody");
IList<Ranorex.TdTag> ilDisplayedDays = tbCalendarBody.FindDescendants<Ranorex.TdTag>("calcell");
IList<Ranorex.TdTag> workBenchCloumn = workBenchRow.FindDescendants<Ranorex.TdTag>();
while (intDisplayedMonth > intMonth)
{
btnPreviousMonth.EnsureVisible();
btnPreviousMonth.Click();
intDisplayedMonth = MonthNameToMonthNum(tdMonth.InnerText);
}
Code: Select all
public void openConn(string env)
{
string HostName,serviceName;
switch(env)
{
case "QA":
HostName="aXX";
serviceName="TEST_T";
break;
case "Dev":
HostName="amSSSm";
serviceName="ODFDT";
break;
default:
HostName="";
serviceName="";
break;
}
string oradb ="Data Source=(DESCRIPTION = " +
"(ADDRESS = (PROTOCOL = TCP)(HOST = "+HostName+")(PORT = XXXX))" +
"(CONNECT_DATA =" +
"(SERVER = DEDICATED)" +
"(SERVICE_NAME = "+serviceName+"))" +
");Persist Security Info=True;User ID=XXXX;Password=XXXX];
try{
conn = new OracleConnection(oradb); // C#
conn.Open();
}catch (Exception e){
Report.Fail("DB Connection not opened, Please check once, exception message: "+e.Message);
}
}
https://github.com/icsharpcode/SharpDev ... ortcuts#01