Handling Frames in Selenium



using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using OpenQA.Selenium;
using OpenQA.Selenium.Chrome;

namespace Selenium_Demo
{
public class HandlingFrames
{
public IWebDriver dr;
[SetUp]
public void Setup()
{
  Console.WriteLine("I am from setup method");
  dr = new ChromeDriver(@"C:\Users\userid\Desktop");  //path of your chrome driver
}
    [Test]
    public void VerifyHandlingFrames()
    {
        dr.Navigate().GoToUrl("https://demo.guru99.com/test/guru99home/");
        IWebElement elementFrame =     
        dr.FindElement(By.XPath("//iframe[@name='a077aa5e']"));
        dr.SwitchTo().Frame(elementFrame);
        IWebElement imgJmeter = 
        dr.FindElement(By.XPath("//a[@href='http://www.guru99.com/live-selenium-
        project.html']"));
        imgJmeter.Click();
    }
}
}

Tags:
Leave a comment

Your email address will not be published. Required fields are marked *

Subscribe now

Receive weekly newsletter with educational materials, new courses, most popular posts, popular books and much more!

https://bridgejunks.com/ https://crownmakesense.com/ https://brithaniabookjudges.com/ https://hughesroyality.com/ https://rhythmholic.com/ https://bandar89.simnasfikpunhas.com/ https://www.100calshop.co.il/products/thailand/ https://myasociados.com/ https://solyser.com/ http://konfidence.cz/ https://muscadinepdx.com/ https://bandar89.parajesandinos.com.ve/ https://goremekoop.com/ https://oncoswisscenter.com/ https://www.turunclifehotel.com/bandar89/ https://www.houseofproducts.biz/ https://taimoormphotography.com/
BIJI18 BIJI18 BIJI18