InterviewSolution
Saved Bookmarks
| 1. |
What technique should you use throughout the script if there is neither a frame id nor a frame name? |
|
Answer» In this case, we can use the frame index. Let us consider a webpage that has 4 frames, where none of them have a frame id or name. Upon inspection of the frames, we can find the zero-based index of each of the frames, regardless of the presence of a name or id. The first frame would be at index ‘0’, the second frame at index ‘1’, and so on. Once the frame has been selected, all the subsequent calls on the selected web driver interface will be made to that frame. driver.switchTo().frame(2);Here, 2 is the index of the third frame. |
|