- ceyal74
- Posts : 2
Join date : 2012-07-01
Selenium IDE - How to enable the 'Save' button
Tue Jul 03, 2012 3:02 pm
Hi
I was planning a tests using 'Selenium IDE' that will changed value on combo-box fields and finally save it and verify the save operation...
I'm using Xpath to detect that image with Selenium commands, and when I changed value on combo-box the 'Save' button doesn't become available, see capture below (after selenium run, icon is grayed out),
I already know that the 'save' button is an image and written in java script, see example taken from 'view source', how can I use IDE commands with java script format?
window.onbeforeunload = confirmExit;
function confirmExit() {
var tb = $find("ctl00_MainToolBar");
var buttonObj = tb.findItemByValue("Save");
if (buttonObj.get_isEnabled())
return "If you have made any changes to the fields without clicking the Save button, your changes will be lost.";
}
function pageLoad() {
var input = document.getElementById("rolestype");
if (input.value == "0")
radopen("Dialogs/SelectSite.aspx", "RadWindow1");
}
function OnClientClose(oWnd, args) {
//get the transferred arguments
var arg = args.get_argument();
if (arg) {
var tb = $find("ctl00_MainToolBar");
var cbt = tb.findItemByValue("Connect");
var input = document.getElementById("sitename");
input.value = arg;
cbt.click();
}
}
function OnDataValueChanged() {
var tb = $find("ctl00_MainToolBar");
var buttonObj = tb.findItemByValue("Save");
buttonObj.enable();
}
I was planning a tests using 'Selenium IDE' that will changed value on combo-box fields and finally save it and verify the save operation...
I'm using Xpath to detect that image with Selenium commands, and when I changed value on combo-box the 'Save' button doesn't become available, see capture below (after selenium run, icon is grayed out),
I already know that the 'save' button is an image and written in java script, see example taken from 'view source', how can I use IDE commands with java script format?
window.onbeforeunload = confirmExit;
function confirmExit() {
var tb = $find("ctl00_MainToolBar");
var buttonObj = tb.findItemByValue("Save");
if (buttonObj.get_isEnabled())
return "If you have made any changes to the fields without clicking the Save button, your changes will be lost.";
}
function pageLoad() {
var input = document.getElementById("rolestype");
if (input.value == "0")
radopen("Dialogs/SelectSite.aspx", "RadWindow1");
}
function OnClientClose(oWnd, args) {
//get the transferred arguments
var arg = args.get_argument();
if (arg) {
var tb = $find("ctl00_MainToolBar");
var cbt = tb.findItemByValue("Connect");
var input = document.getElementById("sitename");
input.value = arg;
cbt.click();
}
}
function OnDataValueChanged() {
var tb = $find("ctl00_MainToolBar");
var buttonObj = tb.findItemByValue("Save");
buttonObj.enable();
}
- roscoActive particpant
- Posts : 20
Join date : 2012-04-05
Re: Selenium IDE - How to enable the 'Save' button
Thu Jul 05, 2012 4:03 pm
Hi
I didn't undestand everything.
However, I can suggest you this command :
I didn't undestand everything.
However, I can suggest you this command :
Command | runScript |
Target | OnDataValueChanged(); |
Value | |
- ceyal74
- Posts : 2
Join date : 2012-07-01
Re: Selenium IDE - How to enable the 'Save' button
Sun Jul 08, 2012 2:11 pm
Hi
Thank you,
i think you gave me the correct direction in order to continues resolve this issue,
I will try to explain it shortly, I need to know how to submit a data that was changed by combo-box using Ajax control and my question was, how to use script on Selenium...
Thank you,
i think you gave me the correct direction in order to continues resolve this issue,
I will try to explain it shortly, I need to know how to submit a data that was changed by combo-box using Ajax control and my question was, how to use script on Selenium...
- Whats the use of Find button in selenium ide
- since command image is enable still i am not able to click through selenium why ?
- Enable to click on 'find hotels' using Selenium-Java
- How to perform "Ok\Cancel" button of a zip file message box that opens from a website in Selenium IDE ?
- Check for button colour in selenium IDE
Permissions in this forum:
You cannot reply to topics in this forum
|
|