Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
ceyal74
Posts : 2
Join date : 2012-07-01

Selenium IDE - How to enable the 'Save' button Empty 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?



Selenium IDE - How to enable the 'Save' button 8VTOP17eO+ZUFnsUAIBo9v8Bj4RGo2t93aQAAAAASUVORK5CYII=


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();

}
avatar
rosco
Active particpant
Active particpant
Posts : 20
Join date : 2012-04-05

Selenium IDE - How to enable the 'Save' button Empty 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 :


Command

runScript

Target


OnDataValueChanged();


Value



avatar
ceyal74
Posts : 2
Join date : 2012-07-01

Selenium IDE - How to enable the 'Save' button Empty 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...
Sponsored content

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

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