I am using Windows form with c# language. I want to pen the new url in the same page in selenium. How can we open the new url in the same page?
Loading
I am using Windows form with c# language. I want to pen the new url in the same page in selenium. How can we open the new url in the same page?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Muhammad Imran AnsariPosted Dec 25, 2023, 9:35 AM
Awesome! Nice to hear, your issue has been resolved.
Mehmet FatihPosted Dec 25, 2023, 5:54 AM
Thanks for your intrest Muhammad Imran. But it is not the thing I want. I have solved the prbolem with the c-following code.
drv.SwitchTo().Window(drv.WindowHandles.ToList().Last());
Muhammad Imran AnsariPosted Dec 24, 2023, 6:55 PM
In Selenium with C#, you can open a new URL in the same browser window by using the Navigate().GoToUrl() method. Here's an example of how you can achieve this in a Windows Forms application:
In the above code snippet, I'm assuming that you have a TextBox named YourTextBox where you can input the URL and a button named OpenUrlButton that triggers the navigation.