/// <summary> /// Get the ID of a Job Posting. The Job ID is only created after the posting has been saved. If it has not been saved, the ID will be "0" /// </summary> /// <returns>The ID of the Job Posting</returns> public void GetJobId() { // wait until the div containing the Job ID is populated WebDriverWait wait = new WebDriverWait(_driver, new TimeSpan(0, 0, 5)); wait.Until(d => !d.FindElement(By.Id("CurrentID")).GetAttribute("value").Equals("0")); JobId = int.Parse(JobID.GetAttribute("value")); }
/// <summary> /// Get the ID of a Job Posting. The Job ID is only created after the posting has been saved. If it has not been saved, the ID will be "0" /// </summary> /// <returns>The ID of the Job Posting</returns> public void GetJobId() { try { BaseWaitForPageToLoad(Driver, 100); // wait until the div containing the Job ID is populated WebDriverWait wait = new WebDriverWait(Driver, new TimeSpan(0, 0, 5)); wait.Until(d => !d.FindElement(By.Id("CurrentID")).GetAttribute("value").Equals("0")); JobId = JobID.GetAttribute("value"); } catch (Exception e) { throw e; } }