Search
 
 

Display results as :
 


Rechercher Advanced Search

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Selenium IDE - How to enable the 'Save' button

View previous topic View next topic Go down

Selenium IDE - How to enable the 'Save' button

Post by ceyal74 on 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();

}

ceyal74

Posts : 2
Join date : 2012-07-01

Back to top Go down

Re: Selenium IDE - How to enable the 'Save' button

Post by rosco on Thu Jul 05, 2012 4:03 pm

Hi

I didn't undestand everything.

However, I can suggest you this command :


Command

runScript

Target


OnDataValueChanged();


Value




rosco
Active particpant
Active particpant

Posts : 20
Join date : 2012-04-05

Back to top Go down

Re: Selenium IDE - How to enable the 'Save' button

Post by ceyal74 on 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...

ceyal74

Posts : 2
Join date : 2012-07-01

Back to top Go down

Re: Selenium IDE - How to enable the 'Save' button

Post by Sponsored content Today at 5:07 pm


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum