- Latha.pActive particpant
- Posts : 11
Join date : 2013-01-06
Updating a record
Sun Jan 06, 2013 11:40 pm
Hi friends,
I have a need to automate Update functionality using Selenium.
The requirement are given in the following steps.
1. Click the tab and select the required mode(inline or popup or page).
2. Select a record which you want to update.
3. Click on Edit.
4. Update the required information.
5. Click on Submit.
6. Verify the record is Updated in the SearchResults tabe and the DB.
Please friends help me to automate this using Selenium.
Can I achieve this task using SeleniumIDE ?
Or can I use SeleniumRC or Selenium WebDriver?
Please guide me to achieve this…….
I have a need to automate Update functionality using Selenium.
The requirement are given in the following steps.
1. Click the tab and select the required mode(inline or popup or page).
2. Select a record which you want to update.
3. Click on Edit.
4. Update the required information.
5. Click on Submit.
6. Verify the record is Updated in the SearchResults tabe and the DB.
Please friends help me to automate this using Selenium.
Can I achieve this task using SeleniumIDE ?
Or can I use SeleniumRC or Selenium WebDriver?
Please guide me to achieve this…….
Re: Updating a record
Mon Jan 07, 2013 1:50 pm
You can achieve this by all selenium IDE, RC and Webdriver.
And no need to create separate question for all diff. functionalities (Create, delete, update, search) as your question for all is same..
So please help us to make blog usable...
And no need to create separate question for all diff. functionalities (Create, delete, update, search) as your question for all is same..
So please help us to make blog usable...
- Latha.pActive particpant
- Posts : 11
Join date : 2013-01-06
Re: Updating a record
Thu Jan 10, 2013 2:30 pm
Hi,
Thanks for replying me rohit.
k sure rohit. The mistake happens bcoz iam new to the blog. I will never repeat this again.
Is creation of record is possible in the dynamic table in SeleniumIDE.
In my app when i click on Search all rows are fetched into the SearchResults table from the DB. But I can view 10 records only. I can view all records in the table by scrolling. Create, Edit, and Delete buttons are there at the top of SearchResults table
Now what i have to do is
1. Select any row in the table.
2. Click on Create.
3. It will create empty row above the previously selected row.
4. Click in the empty row so that it comes to edit mode.
5. Enter the required fields.
6. Click on Submit.
7. After that i have to check whether the record is created or not.
Here i have a doubt. How can i check whether the record is created or not?
I record the above steps upto submit using seleniumIDE.
The recorded steps are following.
1Click id=pt1:r1:0:r1:0:qryId1::search
2Click css=span.x10h
3Click //div[@id='pt1:r1:0:r2:0:pc1:t1::db']/table/tbody/tr/td[2]
4waitForVisible id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_1::content
5type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_1::content 108
6type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_2::content EE
7type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_4::content 12345
8. click //div[@id='pt1:r1:0:r2:0:pc1:submitBtn']/a/span
But the record is not submitted.
Help me plz.........
Thanks for replying me rohit.
k sure rohit. The mistake happens bcoz iam new to the blog. I will never repeat this again.
Is creation of record is possible in the dynamic table in SeleniumIDE.
In my app when i click on Search all rows are fetched into the SearchResults table from the DB. But I can view 10 records only. I can view all records in the table by scrolling. Create, Edit, and Delete buttons are there at the top of SearchResults table
Now what i have to do is
1. Select any row in the table.
2. Click on Create.
3. It will create empty row above the previously selected row.
4. Click in the empty row so that it comes to edit mode.
5. Enter the required fields.
6. Click on Submit.
7. After that i have to check whether the record is created or not.
Here i have a doubt. How can i check whether the record is created or not?
I record the above steps upto submit using seleniumIDE.
The recorded steps are following.
1Click id=pt1:r1:0:r1:0:qryId1::search
2Click css=span.x10h
3Click //div[@id='pt1:r1:0:r2:0:pc1:t1::db']/table/tbody/tr/td[2]
4waitForVisible id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_1::content
5type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_1::content 108
6type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_2::content EE
7type id=pt1:r1:0:r2:0:pc1:t1:26:it1j_id_4::content 12345
8. click //div[@id='pt1:r1:0:r2:0:pc1:submitBtn']/a/span
But the record is not submitted.
Help me plz.........
Re: Updating a record
Thu Jan 10, 2013 4:17 pm
1.You can verify added record by asserttext or verifytext command..if this is true means your record is added successfully.
2.Record is not submitted means??Are you getting any error or what?
2.Record is not submitted means??Are you getting any error or what?
- Latha.pActive particpant
- Posts : 11
Join date : 2013-01-06
Re: Updating a record
Thu Jan 10, 2013 11:29 pm
thank u rohit.
I will use asserttext or verifytext.
It is not getting error.
But some times i observed while doing manual testing that the record is created in UI and not created in the DB.
And clear me one doubt rohit.
In the above steps i said that, Click in the empty row so that it comes to edit mode. which means first it will in view mode. If we click then only it will go into edit mode and i can able to enter the data.
I said that the record is not submitted.
I debug it today what i observed is SeleniumIDE is not recording the click(i.e., click to change view mode into edit mode)
I will use asserttext or verifytext.
It is not getting error.
But some times i observed while doing manual testing that the record is created in UI and not created in the DB.
And clear me one doubt rohit.
In the above steps i said that, Click in the empty row so that it comes to edit mode. which means first it will in view mode. If we click then only it will go into edit mode and i can able to enter the data.
I said that the record is not submitted.
I debug it today what i observed is SeleniumIDE is not recording the click(i.e., click to change view mode into edit mode)
- er.debu
- Posts : 6
Join date : 2013-02-01
Age : 38
Location : Bangalore
Re: Updating a record
Tue Feb 05, 2013 3:22 pm
Hi latha,
sry for posting the code here. the is for asserting text in webdriver. pls check below code.
String text=d1.findElement(By.xpath("//*[@id='header']/table/tbody/tr/td[2]/span[1]")).getText();
Assert.assertEquals(text,"Welcome to ORKL SriRamaTech Enterprises!");
d1.close();
}
}
sry for posting the code here. the is for asserting text in webdriver. pls check below code.
String text=d1.findElement(By.xpath("//*[@id='header']/table/tbody/tr/td[2]/span[1]")).getText();
Assert.assertEquals(text,"Welcome to ORKL SriRamaTech Enterprises!");
d1.close();
}
}
Permissions in this forum:
You cannot reply to topics in this forum