This is what I did. Please refer to comments against Part1 and Part2
set B = Browser("name:=XYZ").Page("title:=XYZ")
*PART 1:*
B.Image("index:=8").click
B.WebElement("innertext:=Apple", "index:=2").highlight
B.WebElement("innertext:=Apple", "index:=2").click
*PART 2:
*text_need_to_enter = "Apple"
wait(2)
Set wsh=createobject("WScript.Shell")
wsh.sendkeys text_need_to_enter
*PART 1 comments*:
If the click method on line3 executes successfully, I don't need PART 2 for
that reason. Because my objective of selecting value is achieved.
The problem is on line 3. It sometimes executes and sometimes doesn't. The
reason it doesn't execute is that it asks to provide unique property.
Although, the properties are unique, but still the problem occurs. Secondly,
if it asks for unique property, then why does it run sometimes. It always
run whenever I remove any existing property say index and insert new
property like innerhtml. Then second time, it will fail again and I will
then remove innerhtml and include index.
So this pingpong carries on, and I don't get a stable script to run the code
unattended. I am confused about why it is doing so, because I can't
understand the logic.
I have attached the code which actually creates the combo. The unique
property is "name"
Regards
I am sending you the code of how the combo really builds up. May be, that
helps.
On Mon, Dec 14, 2009 at 8:49 PM, kamani venkat <[email protected]>wrote:
> Hi Philip,
>
> in my previous mail..direct answer is there.
>
> steps u have follow:
>
> 1. Browser().Page().Image().webElement("index:=2").highlight
> 2. check the above statement is able to highlight the paragraph or text
> filed ..first the object should be highlight
> 3. the above statement is highlighting means the solution is here
> 4. Browser().Page().Image().webElement("index:=2").click
> 5. text_need_to_enter="Obama special"
>
>
> wait 2
> Set wsh=createobject("WScript.Shell")
> wsh.sendkeys text_need_to_enter
>
> this will work.
>
> even with this reply u cant clear.. u can discription of your object.. i
> will prepare entire code....
> urs query is so simple
> keep smiling....
>
> Regards,
> Venkat Kamani
>
> On Mon, Dec 14, 2009 at 10:44 AM, Daim Phillips <[email protected]>wrote:
>
>> Kamani Venkat!
>>
>> I can't find any Frame object. Anyway, I skipped the Frame part, and
>> tried. It didn't select the value and didn't even give me any error message.
>>
>> News1="Obama special"
>>
>> Browser("Home").Page("Home Page Configuration")..WebElement("Paragraph
>> text_1")
>> Browser("Home").Page("Home Page Configuration").WebElement("Paragraph
>> text_1").Click
>>
>> wait 2
>> Set wsh=createobject("WScript.Shell")
>> wsh.sendkeys News1
>>
>> --
>> You received this message because you are subscribed to the Google
>> "QTP - HP Quick Test Professional - Automated Software Testing"
>> group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]<mercuryqtp%[email protected]>
>> For more options, visit this group at
>> http://groups.google.com/group/MercuryQTP?hl=en
>>
>
> --
> You received this message because you are subscribed to the Google
> "QTP - HP Quick Test Professional - Automated Software Testing"
> group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<mercuryqtp%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/MercuryQTP?hl=en
>
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en//I don't understand this code much but developer said that this is how a combo
builds
//up and displays values.
this.supportLevelCombo = new Ext.form.ComboBox( {
fieldLabel :'Support Level',
hiddenName :'supportLevel',
name :'supportLevel',
store :cmsStores.createSupportLevelStore(),
displayField :'name',
valueField :'id',
// typeAhead :true,
forceSelection :true,
mode :'remote',
triggerAction :'all',
selectOnFocus :true,
emptyText :'Select Support Level',
editable :false,
width :140,
scope: this,
blankText:"You didn't select Support Level",
allowBlank: false,
itemCls : 'required',
labelSeparator: '*:'
});
this.supportLevelCombo.on("select",
this.hideShowSupportLevel, this);
______________________________
public static function getPriorityList()
{
$priorityList = array();
array_push($priorityList, Ticket::$PRIORITY_HIGH);
array_push($priorityList, Ticket::$PRIORITY_MEDIUM);
array_push($priorityList, Ticket::$
PRIORITY_LOW);
return $priorityList;
}
----------------------------------------
foreach( $priorities as $priority )
{
$rec['id'] = $priority;
$rec['name'] = $priority;
$arr[] = $rec;
}
---------------------------------------------
var priorityStore = new Ext.data.JsonStore( {
url :'stores/PrioritiesStore.php',
remoteSort :false,
root :"data",
fields : [ 'id', 'name' ]
});