Reputation: 9
I am not able to access a button in a different frame. The part of HTML code for button is:
<input value=" New " class="btn" type="button" name="newAcctButton">
For the frame is:
<iframe frameborder="0" height="6500px" id="itarget" name="itarget" scrolling="auto" src="/servlet/servlet.Integration?lid=01NA0000000aPXG&enc=UTF-8&ic=1" title="Content" width="100%"></iframe>
I am trying that standard format Browser(browsername).Page(pagename).Frame("name:=itarget").getElementByName("newAcctButton").Click
I know this can be easily handled using Record and Playback functionality in QTP.
Is it possible to switch to different frame (like we do in selenium webdriver) and access the web button?
Upvotes: 0
Views: 2084
Reputation: 15370
There is no getElementByName
method in UFT unless you would like to use native object events.
It Should be like this.
Browser(browsername).Page(pagename).Frame("name:=itarget").WebButton("name:=newAcctButton").Click
Upvotes: 1