Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Run automated selenium test scripts from JIRA ondemand
Fri Dec 08, 2017 12:40 pm by azharuddin

» New! Appium Desktop
Sat Nov 25, 2017 3:51 pm by azharuddin

» Selenium WebDriver Integration
Tue Nov 21, 2017 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

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


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