Warning: include(/mounted-storage/home30b/sub003/sc26705-WCCK/seleniumstutorial.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 70 Warning: include(/mounted-storage/home30b/sub003/sc26705-WCCK/seleniumstutorial.com/wp-content/plugins/wp-super-cache/wp-cache-base.php): failed to open stream: No such file or directory in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 70 Warning: include(): Failed opening '/mounted-storage/home30b/sub003/sc26705-WCCK/seleniumstutorial.com/wp-content/plugins/wp-super-cache/wp-cache-base.php' for inclusion (include_path='.:/usr/local/php54/lib/php:/storage/content/94/1008094/pear/php') in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 70 Warning: include_once(/mounted-storage/home30b/sub003/sc26705-WCCK/seleniumstutorial.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php): failed to open stream: No such file or directory in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 90 Warning: include_once(): Failed opening '/mounted-storage/home30b/sub003/sc26705-WCCK/seleniumstutorial.com/wp-content/plugins/wp-super-cache/ossdl-cdn.php' for inclusion (include_path='.:/usr/local/php54/lib/php:/storage/content/94/1008094/pear/php') in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-content/plugins/wp-super-cache/wp-cache.php on line 90 Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/storage/content/94/1008094/seleniumstutorial.com/:/storage/configuration/wrappers/94/1008094/seleniumstutorial.com/:/tmp/) in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-includes/functions.php on line 1618 Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/storage/content/94/1008094/seleniumstutorial.com/:/storage/configuration/wrappers/94/1008094/seleniumstutorial.com/:/tmp/) in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-includes/functions.php on line 1618 Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/storage/content/94/1008094/seleniumstutorial.com/:/storage/configuration/wrappers/94/1008094/seleniumstutorial.com/:/tmp/) in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-includes/functions.php on line 1618 Warning: is_dir(): open_basedir restriction in effect. File(/) is not within the allowed path(s): (/storage/content/94/1008094/seleniumstutorial.com/:/storage/configuration/wrappers/94/1008094/seleniumstutorial.com/:/tmp/) in /storage/content/94/1008094/seleniumstutorial.com/public_html/wp-includes/functions.php on line 1618 WebDriver FindElement by ID in Selenium C# – Selenium's Tutorial

WebDriver FindElement by ID in Selenium C#

The below code can be used to detect an element by ID in  C#

And if you have a custom wait you can find an element using an explicit wait as shown below

The above code will wait for 10 seconds to find the element by called “Login” and if it’s element not found, Selenium will display “Element not Found” error

 

You may also like...