Closed
Bug 1132411
Opened 10 years ago
Closed 10 years ago
Click() function not working when selecting different Year in Calendar using Selenium Firefox Webdriver
Categories
(Firefox :: Untriaged, defect)
Tracking
()
RESOLVED
INCOMPLETE
People
(Reporter: pradyumna.jena540, Unassigned)
Details
Attachments
(1 file)
22.36 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.111 Safari/537.36
Steps to reproduce:
Select the Calendar field. Select Year (Able to select) --> Selecting the past year 2014 (Able to select) --> Now use click() function to click on it
Actual results:
Unable to click on it.
Expected results:
It must be able to click.
Note: It was working earlier with the previous version. Currently firefox version is 36 (BETA) and Selenium Firefox Webdriver verison is 2.44 (Both Selenium and Firefox versions are updated one)
Reporter | ||
Updated•10 years ago
|
Severity: normal → critical
Comment 1•10 years ago
|
||
Why have you assigned this to the SVG component?
Reporter | ||
Comment 2•10 years ago
|
||
Please suggest me to whom should I assign this.
Comment 3•10 years ago
|
||
You need to provide a testcase and not just a screenshot.
Updated•10 years ago
|
Component: SVG → Untriaged
Product: Core → Firefox
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → INCOMPLETE
Reporter | ||
Comment 4•10 years ago
|
||
package WebDriver;
//import java.util.Arrays;
//import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
//import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.Reporter;
import static org.testng.Assert.*;
public class RedilearningLogin
{
//InternetExplorerDriver IEDriver;
FirefoxDriver Driver;
WebDriverWait wait;
WebElement objUN;
WebElement objPWD;
WebElement objLogin;
WebElement objClear;
WebElement objUsersmodule;
WebElement objUserRoleSelect;
WebElement objSelectFacility;
WebElement objMoveFacility;
WebElement objCategory;
WebElement objReportsTo;
WebElement objAdditonalFacility;
WebElement objFacilitySelect;
WebElement objCategorySelect;
WebElement objDeptSelect;
WebElement objJobTitleSelect;
WebElement objAddButton;
WebElement objLN;
WebElement objFN;
WebElement objUserName;
WebElement objfindPasswordField;
WebElement objPassword;
WebElement objRePassword;
WebElement objHiredatefield;
WebElement objPreHireDate;
WebElement objHireDate;
WebElement objYear;
WebElement objMonth;
WebElement objDate;
WebElement objJobTitle;
WebElement objLicenseNumber;
WebElement objLicenseProfession;
WebElement objLicenseDate;
WebElement objLicenseYear;
WebElement objLicenseMonth;
WebElement objLicenseExpiryDate;
WebElement objSkills;
WebElement objCustomCurriculum;
WebElement objCustomAdd;
WebElement objLearnerStatus;
WebElement objCreate;
WebElement objCloseValidation;
WebElement objManageUsers;
WebElement objManageUsername;
WebElement objManageSearch;
WebElement objEditIcon;
WebElement objDeleteIcon;
WebElement objDeleteMessage;
WebElement objDeleteConfirmation;
WebElement objSwitchIcon;
WebElement objGobacktoRLCLC;
/* WebElement datePicker;
List<WebElement> noOfColumns;
List<String> monthList = Arrays.asList("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");
// Expected Date, Month and Year
int expMonth;
int expYear;
String expDate = null;
// Calendar Month and Year
String calMonth = null;
String calYear = null;
boolean datenotfound;*/
/*
public void IEsetup()
{
System.setProperty("webdriver.ie.driver","D:\\IEDriverServer_x64_2.44.0\\IEDriverServer.exe");
IEDriver=new InternetExplorerDriver();
wait=new WebDriverWait(IEDriver,20);
} */
public void setup()
{
Driver=new FirefoxDriver();
wait=new WebDriverWait(Driver,20);
//maximize browser
Driver.manage().window().maximize();
}
// Close browser
public void CloseBrowser()
{
Driver.close();
}
// Quit Object
public void QuitObject()
{
Driver.quit();
}
// Open App using IE
/*public void OpenIEApp(String uN, String pWD) throws InterruptedException
{
IEDriver.get("http://test.redilearning.com/lmsnewui/Account/Login.aspx");
//wait=new WebDriverWait(IEDriver,20);
Thread.sleep(2000);
//wait for title
//wait.until(ExpectedConditions.titleIs("Welcome to RediLearning LMS 2.0"));
Thread.sleep(3000);
// Verify Title
//assertEquals(IEDriver.getTitle(),"Welcome to RediLearning LMS 2.0");
//Reporter.log("Home page displayed");
objUN=IEDriver.findElement(By.name("txtUName"));
objPWD=IEDriver.findElement(By.name("txtPwd"));
//Verify UN, PWD
assertTrue(objUN.isDisplayed()&&objPWD.isDisplayed());
Reporter.log("UN, PWD are displayed");
objLogin=IEDriver.findElement(By.name("btnLogin"));
objClear=IEDriver.findElement(By.xpath("//*[@id='frmLogin']/div[3]/div/div/div[2]/div[3]/div/div[2]/div/span/img"));
//Verify Login and Clear
assertTrue(objLogin.isDisplayed() && objClear.isDisplayed());
Reporter.log("Login and Clear displayed");
// Enter All User Details
objUN.clear();
objUN.sendKeys(uN);
objPWD.clear();
objPWD.sendKeys(pWD);
objLogin.click();
}
*/
// Open App
public void OpenApp(String uN, String pWD)
{
Driver.get("http://test.redilearning.com/lmsnewui/Account/Login.aspx");
//wait for title
wait.until(ExpectedConditions.titleIs("Welcome to RediLearning LMS 2.0"));
// Verify Title
assertEquals(Driver.getTitle(),"Welcome to RediLearning LMS 2.0");
Reporter.log("Home page displayed");
objUN=Driver.findElement(By.name("txtUName"));
objPWD=Driver.findElement(By.name("txtPwd"));
//Verify UN, PWD
assertTrue(objUN.isDisplayed()&&objPWD.isDisplayed());
Reporter.log("UN, PWD are displayed");
objLogin=Driver.findElement(By.name("btnLogin"));
objClear=Driver.findElement(By.xpath("//*[@id='frmLogin']/div[3]/div/div/div[2]/div[3]/div/div[2]/div/span/img"));
//Verify Login and Clear
assertTrue(objLogin.isDisplayed() && objClear.isDisplayed());
Reporter.log("Login and Clear displayed");
// Enter All User Details
objUN.clear();
objUN.sendKeys(uN);
objPWD.clear();
objPWD.sendKeys(pWD);
objLogin.click();
}
//Create User page
public void CreateUser(String Lastname, String Firstname, String Username, String Password, String RePassword, String LicenseNumber) throws InterruptedException
{
objUsersmodule=Driver.findElement(By.xpath("//*[@id='CtrlClientHeader1_hlUsers']"));
objUsersmodule.click();
//Verify Users Module
// assertTrue(objUsersmodule.isDisplayed());
//Reporter.log("Users module displayed");
Thread.sleep(5000);
objUserRoleSelect=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[1]/div[2]/select/option[4]"));
objUserRoleSelect.click();
//Verify User Role Selected
assertTrue(objUserRoleSelect.isDisplayed());
Reporter.log("User Role Learner Selected");
Thread.sleep(6000);
objSelectFacility=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[1]/div[4]/table/tbody/tr/td[1]/select/option[6]"));
objSelectFacility.click();
objMoveFacility=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_btnsinlefttoright']"));
objMoveFacility.click();
// Verify User Facility
assertTrue(objMoveFacility.isDisplayed());
Reporter.log("Learner Facility Selected");
Thread.sleep(5000);
objCategory=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[2]/div[2]/select/option[3]"));
objReportsTo=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[2]/div[4]/select/option"));
objCategory.click();
Thread.sleep(2000);
objReportsTo.click();
// Verify Category and ReportsTo
assertTrue(objCategory.isDisplayed() && objReportsTo.isDisplayed());
Reporter.log("Category and ReportsTo selected");
Thread.sleep(2000);
objAdditonalFacility=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_trFacilityInfo']/h3/a"));
objAdditonalFacility.click();
// Verify Additional Facility Tab opened
assertTrue(objAdditonalFacility.isDisplayed());
Reporter.log("Additional Facility Tab selected");
Thread.sleep(2000);
objFacilitySelect=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[4]/div/div[1]/div/div[1]/div[2]/select/option[13]"));
objFacilitySelect.click();
Thread.sleep(3000);
objCategorySelect=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[4]/div/div[1]/div/div[2]/div[2]/select/option[5]"));
objCategorySelect.click();
// Verify Additional Facility: Category
assertTrue(objCategorySelect.isDisplayed());
objCategorySelect.click();
Reporter.log("Additonal Facility: Category Selected");
objDeptSelect=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[4]/div/div[1]/div/div[1]/div[4]/select/option[2]"));
objDeptSelect.click();
// Verify Additional Facility: Department
assertTrue(objDeptSelect.isDisplayed());
Reporter.log("Additional Facility: Department selected");
Thread.sleep(3000);
objJobTitleSelect=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[4]/div/div[1]/div/div[2]/div[4]/select/option[10]"));
objJobTitleSelect.click();
// Verify Additional facility: Job Title
assertTrue(objJobTitleSelect.isDisplayed());
Reporter.log("Additonal Facility: Job title displayed");
Thread.sleep(3000);
objAddButton=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_btnaddfacility']"));
objAddButton.click();
// Verify Additional Facility Add button
assertTrue(objAddButton.isDisplayed());
Reporter.log("Additional Facility Add button displayed");
Thread.sleep(4000);
//objAdditonalFacility.click();
objLN=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtLastName']"));
objLN.clear();
objLN.sendKeys(Lastname);
// Verify Last Name
assertTrue(objLN.isDisplayed());
Reporter.log("Last Name is displayed");
Thread.sleep(2000);
objFN=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtFirstName']"));
objFN.clear();
objFN.sendKeys(Firstname);
// Verify First Name
assertTrue(objFN.isDisplayed());
Reporter.log("First Name is displayed");
Thread.sleep(2000);
objUserName=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtUserName']"));
objUserName.clear();
objUserName.sendKeys(Username);
// User Name
assertTrue(objUserName.isDisplayed());
Reporter.log("User Name is displayed");
Thread.sleep(2000);
objfindPasswordField=Driver.findElement(By.xpath("//*[@id='rightcontainer']/div/div[2]/div[8]/div[1]"));
objfindPasswordField.click();
Thread.sleep(4000);
objPassword=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtPassword']"));
objPassword.clear();
objPassword.sendKeys(Password);
// Verify Password
assertTrue(objPassword.isDisplayed());
Reporter.log("Password entered");
Thread.sleep(2000);
objRePassword=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtRePwd']"));
objRePassword.clear();
objRePassword.sendKeys(Password);
// Verify Re - Enter Password
assertTrue(objRePassword.isDisplayed());
Reporter.log("Password Re - entered");
Thread.sleep(2000);
objHiredatefield=Driver.findElement(By.xpath("//*[@id='ContentPlaceHolder1_txtHireDate']"));
objHiredatefield.click();
/* datenotfound = true;
int expMonth;
int expYear;
String expDate = null;
expDate = "18";
expMonth= 8;
expYear = 2013;
//This loop will be executed continuously till dateNotFound Is true.
while(datenotfound)
{
//Retrieve current selected year name from date picker popup.
calYear = Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[2]/option[10]")).getText();
//Retrieve current selected month name from date picker popup.
calMonth = Driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div/div/select[1]")).getText();
//If current selected month and year are same as expected month and year then go Inside this condition.
if(monthList.indexOf(calMonth)+1 == expMonth && (expYear == Integer.parseInt(calYear)))
{
//Call selectDate function with date to select and set dateNotFound flag to false.
selectDate(expDate);
datenotfound = false;
}
//If current selected month and year are less than expected month and year then go Inside this condition.
else if(expYear > Integer.parseInt(calYear) || monthList.indexOf(calMonth)+1 < expMonth && (expYear == Integer.parseInt(calYear)))
{
//Click on next button of date picker.
Driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div/a[1]/span")).click();
}
//If current selected month and year are greater than expected month and year then go Inside this condition.
else if(monthList.indexOf(calMonth)+1 > expMonth && (expYear == Integer.parseInt(calYear)) || expYear < Integer.parseInt(calYear))
{
//Click on previous button of date picker.
Driver.findElement(By.xpath(".//*[@id='ui-datepicker-div']/div/a[2]/span")).click();
}
}
Thread.sleep(3000);
}
public void selectDate(String date)
{
datePicker = Driver.findElement(By.id("ContentPlaceHolder1_txtHireDate"));
noOfColumns=datePicker.findElements(By.tagName("td"));
//Loop will rotate till expected date not found.
for (WebElement cell: noOfColumns){
//Select the date from date picker when condition match.
if (cell.getText().equals(date)){
cell.findElement(By.linkText(date)).click();
break;
}
// objHiredatefield.sendKeys("11272014");
objHiredatefield.click();
Thread.sleep(2000);
objPreHireDate=Driver.findElement(By.xpath("//*[@id='ui-datepicker-div']/div/div/select[2]"));
objPreHireDate.click(); */
// Verify Pre - Hire Date field
//assertTrue(objPreHireDate.isDisplayed());
//Reporter.log("Pre - Hire Date field displayed");
Thread.sleep(2000);
//objHireDate=Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[2]/option[10]"));
//objHireDate.click();
// Verify Hire Date field
//assertTrue(objHireDate.isDisplayed());
//Reporter.log("Hire Date field displayed");
//Thread.sleep(2000);
objYear=Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[2]/option[10]"));
objYear.click();
// Verify Year
assertTrue(objYear.isDisplayed());
Reporter.log("Hire Date: Year selected");
Thread.sleep(2000);
objMonth=Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[1]/option[11]"));
objMonth.onClick();
// Verify Month
assertTrue(objMonth.isDisplayed());
Reporter.log("Hire Date: Month Selected");
Thread.sleep(2000);
objDate=Driver.findElement(By.xpath("html/body/div[1]/table/tbody/tr[4]/td[3]/a"));
objDate.click();
// Verify Date
assertTrue(objDate.isDisplayed());
Reporter.log("Hire Date: date selected");
objDate=Driver.findElement(By.xpath("/html/body/div[1]/table/tbody/tr[2]/td[3]/a"));
objDate.click();
Thread.sleep(2000);
objJobTitle=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[11]/div[2]/select/option[21]"));
objJobTitle.click();
// Verify Job Title Field
assertTrue(objJobTitle.isDisplayed());
Reporter.log("Job title selected");
Thread.sleep(2000);
objLicenseNumber=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[5]/div[4]/input"));
objLicenseNumber.sendKeys(LicenseNumber);
// Verify License Number
assertTrue(objLicenseNumber.isDisplayed());
Reporter.log("License Number Entered");
Thread.sleep(2000);
objLicenseProfession=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[6]/div[4]/table/tbody/tr/td[1]/select/option[3]"));
objLicenseProfession.click();
Thread.sleep(2000);
// Verify License Profession
assertTrue(objLicenseProfession.isDisplayed());
Reporter.log("License Profession selected");
Thread.sleep(2000);
objLicenseDate=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[7]/div[4]/input"));
objLicenseDate.click();
// Verify License Expiration field selection
assertTrue(objLicenseDate.isDisplayed());
Reporter.log("License Expiration Date field selected");
Thread.sleep(2000);
objLicenseYear=Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[2]/option[2]"));
// Verify License Expiration: Year
assertTrue(objLicenseYear.isDisplayed());
Reporter.log("License Expiration: year selected");
Thread.sleep(2000);
objLicenseMonth=Driver.findElement(By.xpath("/html/body/div[1]/div/div/select[1]/option[10]"));
// Verify License Expiration: Month Selected
assertTrue(objLicenseMonth.isDisplayed());
Reporter.log("License Expiration: Month selected");
Thread.sleep(2000);
objLicenseExpiryDate=Driver.findElement(By.xpath("/html/body/div[1]/table/tbody/tr[4]/td[2]/a"));
objLicenseExpiryDate.click();
// Verify License Expiration: Date
assertTrue(objLicenseExpiryDate.isDisplayed());
Reporter.log("License Expiration: Date selected");
Thread.sleep(2000);
objSkills=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[9]/div[4]/table/tbody/tr/td[1]/span/input"));
objSkills.click();
// Verify Skills
assertTrue(objSkills.isDisplayed());
Reporter.log("Skills displayed");
Thread.sleep(2000);
objCustomCurriculum=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[10]/div[4]/div/div[1]/ul/li[7]"));
objCustomCurriculum.click();
// Verify List of Custom Curriculum
assertTrue(objCustomCurriculum.isDisplayed());
Reporter.log("List of Custom Curriculum displayed");
Thread.sleep(2000);
objCustomAdd=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[10]/div[4]/div/div[1]/ul/li[7]/a/span"));
objCustomAdd.click();
// Verify Custom Curriculum Added
assertTrue(objCustomAdd.isDisplayed());
Reporter.log("Custom Curriculum Added");
Thread.sleep(2000);
objLearnerStatus=Driver.findElement(By.xpath("/html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[12]/div[2]/table/tbody/tr/td[2]/input"));
objLearnerStatus.click();
// Verify Learner Status Selection
assertTrue(objLearnerStatus.isDisplayed());
Reporter.log("Learner Status selected");
Thread.sleep(2000);
objCreate=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div/div[2]/div[13]/input[1]"));
objCreate.click();
// Verify User Create button
assertTrue(objCreate.isDisplayed());
Reporter.log("User Create button displayed");
Thread.sleep(2000);
objCloseValidation=Driver.findElement(By.xpath("html/body/div[4]/div[2]/div[1]/img"));
objCloseValidation.click();
// Verify User Created Validation
assertTrue(objCloseValidation.isDisplayed());
Reporter.log("User Created Successfully validation displayed");
}
// Login for a Learner
public void LoginToLearner(String Username, String Password)
{
objUN.clear();
objUN.sendKeys(Username);
objPWD.clear();
objPWD.clear();
objPWD.sendKeys(Password);
objLogin.click();
}
// Manage User page - 1 -- Edit User
public void ManageUsers1(String Username) throws InterruptedException
{
objManageUsers=Driver.findElement(By.name("Manage Users"));
objManageUsers.click();
// Verify Manage Users page
assertTrue(objManageUsers.isDisplayed());
Reporter.log("Manage Users page displayed");
Thread.sleep(2000);
objManageUsername=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[3]/div[2]/input"));
objManageUsername.click();
objManageUsername.sendKeys(Username);
// Verify UserName entered
assertTrue(objManageUsername.isDisplayed());
Reporter.log("UserName entered in search field");
Thread.sleep(2000);
objManageSearch=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[5]/input[1]"));
objManageSearch.click();
// Verify Manage Users Search Button
assertTrue(objManageSearch.isDisplayed());
Thread.sleep(5000);
Reporter.log("Manage Users Search button clicked");
objEditIcon=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[2]/div/div[2]/div[2]/table/tbody/tr/td[1]/table/tbody/tr/td[1]/a"));
objEditIcon.click();
// Verify Edit Icon
assertTrue(objEditIcon.isDisplayed());
Reporter.log("Edit icon clicked");
}
// Manage User Page - 2 -- Delete User
public void ManageUsers2(String Username) throws InterruptedException
{
objManageUsers=Driver.findElement(By.name("Manage Users"));
objManageUsers.click();
// Verify Manage Users page
assertTrue(objManageUsers.isDisplayed());
Reporter.log("Manage Users page displayed");
Thread.sleep(2000);
objManageUsername=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[3]/div[2]/input"));
objManageUsername.click();
objManageUsername.sendKeys(Username);
// Verify UserName entered
assertTrue(objManageUsername.isDisplayed());
Reporter.log("UserName entered in search field");
Thread.sleep(2000);
objManageSearch=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[5]/input[1]"));
objManageSearch.click();
// Verify Manage Users Search Button
assertTrue(objManageSearch.isDisplayed());
Thread.sleep(5000);
objDeleteIcon=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[2]/div/div[2]/div[2]/table/tbody/tr/td[1]/table/tbody/tr/td[2]/a"));
objDeleteIcon.click();
// Verify Delete Icon Clicked
assertTrue(objDeleteIcon.isDisplayed());
Reporter.log("Delete Icon Clicked");
Thread.sleep(2000);
objDeleteMessage=Driver.findElement(By.name("Are you sure you want to delete User?"));
// Verify Delete User Message
assertTrue(objDeleteMessage.isDisplayed());
Reporter.log("Are you sure you want to delete User? displayed");
objDeleteConfirmation=Driver.findElement(By.xpath("html/body/div[3]/div[3]/div/button[1]"));
// Verify Delete Message Closed
assertTrue(objDeleteConfirmation.isDisplayed());
Reporter.log("Deleting User Message closed");
objDeleteConfirmation.click();
}
//Manage User page - 3 -- Switch to user
public void ManageUsers3(String Username) throws InterruptedException
{
objManageUsers=Driver.findElement(By.name("Manage Users"));
objManageUsers.click();
// Verify Manage Users page
assertTrue(objManageUsers.isDisplayed());
Reporter.log("Manage Users page displayed");
Thread.sleep(2000);
objManageUsername=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[3]/div[2]/input"));
objManageUsername.click();
objManageUsername.sendKeys(Username);
// Verify UserName entered
assertTrue(objManageUsername.isDisplayed());
Reporter.log("UserName entered in search field");
Thread.sleep(2000);
objManageSearch=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[1]/div[5]/input[1]"));
objManageSearch.click();
// Verify Manage Users Search Button
assertTrue(objManageSearch.isDisplayed());
Thread.sleep(5000);
objSwitchIcon=Driver.findElement(By.xpath("html/body/form/div[3]/div[4]/div[1]/div[1]/div/div/div/div[2]/div[2]/div/div[2]/div[2]/table/tbody/tr/td[1]/table/tbody/tr/td[3]/a"));
// Verify Switch To User Icon
assertTrue(objSwitchIcon.isDisplayed());
Reporter.log("Switch to User icon displayed");
objSwitchIcon.click();
objGobacktoRLCLC=Driver.findElement(By.linkText("<< Go back to RLCLC Login"));
// Verify Navigation to Learner Login
assertTrue(objGobacktoRLCLC.isDisplayed());
Reporter.log("Learner My Login page displayed");
objGobacktoRLCLC.click();
}
//Logout from Application
public void logout()
{
//Click on logout
Driver.findElement(By.linkText("Logout")).click();
//wait for title
wait.until(ExpectedConditions.titleIs("Welcome to RediLearning LMS 2.0"));
// Verify Title
assertEquals(Driver.getTitle(),"Welcome to RediLearning LMS 2.0");
Reporter.log("Logout successful");
}
}
Reporter | ||
Comment 5•10 years ago
|
||
In above page, objYear.click(); not working
Reporter | ||
Comment 6•10 years ago
|
||
package TestScripts;
import org.testng.annotations.Test;
import WebDriver.RedilearningLogin;
public class LoginToRLCLC {
@Test
public void LogintoRLCLC() throws InterruptedException
{
RedilearningLogin RLLogin=new RedilearningLogin();
RLLogin.setup();
RLLogin.OpenApp("lmsnewuirlclc","123456");
Thread.sleep(5000);
RLLogin.logout();
}
}
Reporter | ||
Comment 7•10 years ago
|
||
<suite name="RL Automation">
<test name="Users Function">
<Classes>
<Class name="TestScripts.LogintoRLCLC"/>
<Class name="TestScripts.RedilearningLogin"/>
</Classes>
</test>
</suite>
Reporter | ||
Comment 8•10 years ago
|
||
The entire code is a set of test cases i.e.Test Suite.
Reporter | ||
Updated•10 years ago
|
Status: RESOLVED → UNCONFIRMED
Resolution: INCOMPLETE → ---
Comment 9•10 years ago
|
||
This is java code, not something the browser can run. Please attach a reduced html/javascript/css testcase that shows the issue.
Don't add it as comments though, instead use the Add an attachment link above to include files.
Updated•10 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago → 10 years ago
Resolution: --- → INCOMPLETE
You need to log in
before you can comment on or make changes to this bug.
Description
•