Contributions
Re: how Can i get the gylphicon class element which I am not able to spy
Hi Apologies for late reply. you are right it is giving me the HTML object and cant be inspected. I wasn't able to call the native method (vm.action() ) but i am able to now call the click method with the correct syntax. the correct syntax to click the object is : Sys.Process("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(0).Panel(0).Panel(2).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Table(0).Cell(2, 4).QuerySelector("span.glyphicon.glyphicon-pencil.pointer").Click() this is working for me. here I calling the QuerySelector Method on its immediate parent which is detected by object spy and supports the QuerySelector method. The co-ordinate logic would have not worked in my case as the position of the edit img varies in the table cell. thanks, Amey3KViews0likes0CommentsRe: how Can i get the gylphicon class element which I am not able to spy
not sure how can I get the Xpath in IE. but tired to useNativeWebObject.Find method but that is also not working I tried Sys.Process("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(0).Panel(0).Panel(2).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Table(0).Cell(2, 4).NativeWebObject.Find("tooltip","Edit","span") but this is also not returning anything for some values it gives me an object which is empty thats probably because it was not able to fine that object. and some times it gives me an object but the Inspect button is disabled in the evaluate window not sure why I am getting this. Do I need to install some drivers or anything else . And agian for query selector method I tried to run the example provided by smartbear which is Sub Test Dim TestedPage, CSSSelector, res Browsers.Item(btChrome).Run("https://smartbear.com/") Set TestedPage = Sys.Browser("*").Page("https://smartbear.com/") CSSSelector = "div#main-nav" ' Call the function Set res=TestedPage.QuerySelector(CSSSelector) ' Check the result If Not res Is Nothing Then ' If the element was found, output its HTML code Log.Message(res.outerHTML) Else ' If the element was not found, post a warning to the log Log.Warning("The element was not found.") End If End Sub but this is also not working and i am getting the message as element was not found mesasge. here also the res is returning and object whose Inspect Button is disabled in the Evaluate window when I try to evaluate the res.3.1KViews0likes2CommentsRe: how Can i get the gylphicon class element which I am not able to spy
yes I tried that but i am not getting any object in return when I execute this Sys.Process("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(0).Panel(0).Panel(2).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Table(0).Cell(2, 4).QuerySelector("span.glyphicon glyphicon-pencil pointer") it this correct because i am getting an object when i evaluate this but I am not able to inspect that object. please see attach image in that image we can see object as Result but the Inspect button is disabled not sure why and not able to check what I am getting.3.1KViews0likes6Commentshow Can i get the gylphicon class element which I am not able to spy
I need to perform a click action on a glyphicon class element which I am not able to spy. the element which I want to click is the pencil icon in the cell.(attached Image pencil.pgn) As I said I am not able to spy this element and I am using a data driven framework where I need the objects full name to perform a click action. I tried getting the object item for the pencil icon using the Queryselector method on the cells fullname which should be the parent item of the pencil icon. this is what i am seeing when I inspect the pencil icon so I tried using the class on the object of the cell Sys.Process("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel(0).Panel(0).Panel(2).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Table(0).Cell(2, 4).QuerySelector(".glyphicon") this gave me an empty object. and when I am using the class name as ".glyphicon glyphicon-pencil pointer" i am getting error as missing ')'. what am I missing here ? am I doing this correctly ? any alternative to click the pencil icon which is not spy able using the object spy as I need the full name of that object to perform any action. Thanks, amey3.1KViews0likes8Commentsuse of FindChild with 2 propertynames and 2 propertyvalues RUN TIME(at the time of Evaluate)
HI, i am trying to evaluate and object and i am using findchild property Run Time in that can i use 2 property name and 2 property values. like Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel(0).Panel("cphActionsLeft_ddSavedFilters_DropDown").Panel(0).FindChild(["contentText","ObjectIdentifier"],["All Overdue Inspections","1"],2) can i use this ? Thanks, Amey764Views0likes1CommentRe: how to make use of waitchild and find child
HI, hi trying to evaluate and object and i am using findchild property in that can i use 2 property name and 2 property values. like Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel(0).Panel("cphActionsLeft_ddSavedFilters_DropDown").Panel(0).FindChild(["contentText","ObjectIdentifier"],["All Overdue Inspections,"1"],2) can i use this ? sorry that i have asked this doubt in the existing link. but found a good example of findchild method thus asking here. Thanks, Amey2.3KViews0likes0CommentsRe: test scripts fail in full test run but pass when executed individually with no changes made in tests
yes got it. But just a small doubt what did you used to break the while loop after 60 seconds? you see in the belowcode i tried to break the while loop using the Break() method after the counter reaches 60 (which indicates that 60 seconds have passed and object is not available) but I an not able to break the loop here. even tried using Exit in the IF inside the while but that also did not worked While Not object.VisibleOnScreen'or object.Exists aqUtils.Delay 1000 ' 1 sec delay If counter > 60 then 'Exit Break() Else counter = counter + 1 End If WEnd3.4KViews0likes1CommentHow can I use the waitchild method here to check if the object is available or not. OR any otherway.
i am testing a web application and using a datadriven framework which takes inputs from the couple of excel sheet. 1. One excel sheet contains the Full names of the objects and variables mapped to this full name. 2. other excel sheet contains the mapped names and the actions to be performed on the objects. the frame work creates a command using both the excels to be executed using the mapped name of the object. I am building a command to execute from "Func_BuildCommandLine" passing an excel sheet as a parameter 'Build the strCommandLine strCommandLine = func_BuildCommandLine(Driver2) sys.Refresh() that function returns value of strCommandLine = "Call Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContent").Panel("contentWrapper").Panel("LoginBar").Table(0).Cell(2, 1).SubmitButton("ContentPlaceHolder1_cmdSubmit").Click" and later the command is executed as 'Execute the Command Line right here Execute(strCommandLine) Before executing the Command I need to make sure the object exists as sometimes it takes more time to load the page and the test is timeout before the object is loaded. is there any way to make sure the object is available to click or perform any action. Is there any method which takes the full name as parameter and checks its availability before performing the action871Views0likes2CommentsRe: test scripts fail in full test run but pass when executed individually with no changes made in tests
I already tried this If not sys.WaitChild(myobject,100000).Exists then end if But this isnt working either. I am using waithchild method on sys object and myobject contais the Full name of the object. I have attached the error snaps for. 1. Errormessage_1.PNG this the error message i am getting of the objects. this objects are available on the screen but the click action is not performed on this. 2.AdditionalInfo_1.PNG this code line generates the error Execute(strCommandLine) herestrCommandLine is a string variable which contains the : "Call Sys.Browser("iexplore").Page("*").Form("aspnetForm").Panel("divHeaderAndContentPanel").Panel("divHeaderAndContent").Panel("divHeaderContainer").Panel("divHeader").Table(0).Cell(0, 1).TextNode("cphActionsRight_cmdManage").Click" in the frame work I am using all the action are preformed using the "execute" method. In Image.PNG contains the image of the button on which the action is to be performed. "There was an attempt to perform an action on a zero-sized window" this the error message i am getting mostly where the object is present and available on screen and the same tests when executed individually passes successfully. Not able to figure out y this is happening thanks, Amey3.4KViews0likes3CommentsRe: test scripts fail in full test run but pass when executed individually with no changes made in tests
Hi Yes i too had the same doubt regarding the timing issue and for that I tried to add a exist check. While Not object.VisibleOnScreen'or object.Exists aqUtils.Delay 1000 ' 1 sec delay If counter > 60 then Break() Else counter = counter + 1 End If WEnd But here the Break statement is not working and o the infinite loop as I need to time out the test if the object is not available after some time. Not sure What i am missing here. And what exactly do you need from the testlog should i share the error message or any other thing from the log thanks, amey3.5KViews0likes5Comments