Menu
Home
Forums
New posts
Search forums
What's new
New posts
New media
New media comments
New profile posts
Latest activity
Media
New media
New comments
Search media
Members
Current visitors
New profile posts
Search profile posts
Account Upgrades
Advertise
Marketplace
Money
PerfectMoney
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Home
Forums
Programming & Web Design
Programming
C, C++, C#
How do I establish an open connection to an open web browser in C#?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Xarzu" data-source="post: 21732" data-attributes="member: 9116"><p>How do I establish an open connection to an open web browser in C#?</p><p></p><p>In a Microsoft C# program using a Visual Studio Code I am using the following namespaces:</p><p></p><p><strong>using OpenQA.Selenium;</strong></p><p><strong>using OpenQA.Selenium.Chrome;</strong></p><p><strong>using OpenQA.Selenium.Support.UI;</strong></p><p></p><p>After I get a string variable, "url", assigned with a URL of a website page, I use the following commands which successfully opens a browser window and loads the web site:</p><p></p><p><strong>IWebDriver driver = new ChromeDriver();</strong></p><p><strong>driver.Navigate().GoToUrl(url);</strong></p><p></p><p>But this opens a chrome browser which is denoted somewhere as being a "test" session. It somehow knows it was launched from a program. And, since I am using this program to automate some interactions with linkedin, this information is passed along to linkedin which prompts me that it requires I login. This creates a cascading seriies of events that are difficult to automate including using my cell as a means of verification.</p><p></p><p>So, instead of taking this route, how do I establish an open connection to an open web browser in C#? I figure, if I instead connect to a web browser that is already open and already has its veriication steps done with linkedin, then I won't be prompted to log in and do any user verification.</p><p></p><p>On a personal note, if this is intentional security measures to prevent people from abusing a system, then this is a sad thing.</p><p></p><p>On a broader view, will all this mean I will have to make a web browser from scratch?</p></blockquote><p></p>
[QUOTE="Xarzu, post: 21732, member: 9116"] How do I establish an open connection to an open web browser in C#? In a Microsoft C# program using a Visual Studio Code I am using the following namespaces: [B]using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Support.UI;[/B] After I get a string variable, "url", assigned with a URL of a website page, I use the following commands which successfully opens a browser window and loads the web site: [B]IWebDriver driver = new ChromeDriver(); driver.Navigate().GoToUrl(url);[/B] But this opens a chrome browser which is denoted somewhere as being a "test" session. It somehow knows it was launched from a program. And, since I am using this program to automate some interactions with linkedin, this information is passed along to linkedin which prompts me that it requires I login. This creates a cascading seriies of events that are difficult to automate including using my cell as a means of verification. So, instead of taking this route, how do I establish an open connection to an open web browser in C#? I figure, if I instead connect to a web browser that is already open and already has its veriication steps done with linkedin, then I won't be prompted to log in and do any user verification. On a personal note, if this is intentional security measures to prevent people from abusing a system, then this is a sad thing. On a broader view, will all this mean I will have to make a web browser from scratch? [/QUOTE]
Name
Verification
Post reply
Home
Forums
Programming & Web Design
Programming
C, C++, C#
How do I establish an open connection to an open web browser in C#?
Top