Display results as :

Rechercher Advanced Search

Latest topics
» 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

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce


Javascript and parsing a string

View previous topic View next topic Go down

Javascript and parsing a string

Post by oalejo2000phpbb on Wed Aug 25, 2010 12:21 am

Hello all, I have recently started using selenium and I have been trying to automating it using a little javascript.
The issue that I am having is trying to pass variable from Selenium to Javascript, but I have been unable to do it. I keep getting a variable not defined javascript error. I was wondering if someone can point me on the right path.

basically my script is like this:

Get a value from a table:
command: storeTable
Target: //td[2]/table.3.9
Value: SMSTemplate

Plug part of value from above table into a field in my html page:
Command: type
Target: phoneNumber
Value: javascript{var temp = new String(); temp =SMSTemplate.substring(3,7);}

I get the following error in the second command:
[error] Unexpected Exception: message -> SMSTemplate is not defined, fileName ->
chrome://selenium-ide/content/selenium/scripts/selenium-api.js, lineNumber ->
2482, stack -> ("javascript{var temp = new String(); temp
("javascript{var temp = new String(); temp
XULCommandEvent])@chrome://selenium-ide/content/selenium-ide.xul:1 , name ->


Posts : 1
Join date : 2010-08-25

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