How we can click on 'Href' link under Selenium Webdriver?How to maximize the browser window in Selenium WebDriver (Selenium 2) using C#?How to take screenshot with Selenium WebDriverSelenium c# Webdriver: Wait Until Element is PresentGet HTML Source of WebElement in Selenium WebDriver using PythonSelenium WebDriver - Test if element is presentHow to run Selenium WebDriver test cases in Chrome?extract an image by id or class name in selenium by using javaCan a website detect when you are using selenium with chromedriver?How to click on an image in selenium webdriverHTML unit driver with selenium not click the button

System.debug(JSON.Serialize(o)) Not longer shows full string

You cannot touch me, but I can touch you, who am I?

Method to test if a number is a perfect power?

What is the opposite of 'gravitas'?

Was Spock the First Vulcan in Starfleet?

For a non-Jew, is there a punishment for not observing the 7 Noahide Laws?

Risk of infection at the gym?

Gears on left are inverse to gears on right?

Two monoidal structures and copowering

Fastening aluminum fascia to wooden subfascia

Balance Issues for a Custom Sorcerer Variant

How do we know the LHC results are robust?

Do sorcerers' subtle spells require a skill check to be unseen?

What does "I’d sit this one out, Cap," imply or mean in the context?

How can I get through very long and very dry, but also very useful technical documents when learning a new tool?

How to pronounce the slash sign

How does Loki do this?

Customer Requests (Sometimes) Drive Me Bonkers!

Type int? vs type int

What can we do to stop prior company from asking us questions?

Is exact Kanji stroke length important?

Trouble understanding the speech of overseas colleagues

Purchasing a ticket for someone else in another country?

How does the UK government determine the size of a mandate?



How we can click on 'Href' link under Selenium Webdriver?


How to maximize the browser window in Selenium WebDriver (Selenium 2) using C#?How to take screenshot with Selenium WebDriverSelenium c# Webdriver: Wait Until Element is PresentGet HTML Source of WebElement in Selenium WebDriver using PythonSelenium WebDriver - Test if element is presentHow to run Selenium WebDriver test cases in Chrome?extract an image by id or class name in selenium by using javaCan a website detect when you are using selenium with chromedriver?How to click on an image in selenium webdriverHTML unit driver with selenium not click the button













0















I want to click on the href link as per attached image, And I've tried the below code but seems like it's not working. Please help me.



.....



driver.findElement(By.xpath("//a[@href='Careers']")).click();



............



Here is HTML content for Div tag...
..............





 <div class="logo">
<img src="/ui/healthcare/assets/images/core/ascension_logo_white.svg" alt="Ascension">
</div>


<ul class="list-group">
<li>
<h4>Get Involved</h4>
<ul class="link-list">
<li><a href="/Careers">Careers</a></li>
<li><a href="/Events">Classes and Events</a></li>


........................



.....enter image description here



enter image description here










share|improve this question




























    0















    I want to click on the href link as per attached image, And I've tried the below code but seems like it's not working. Please help me.



    .....



    driver.findElement(By.xpath("//a[@href='Careers']")).click();



    ............



    Here is HTML content for Div tag...
    ..............





     <div class="logo">
    <img src="/ui/healthcare/assets/images/core/ascension_logo_white.svg" alt="Ascension">
    </div>


    <ul class="list-group">
    <li>
    <h4>Get Involved</h4>
    <ul class="link-list">
    <li><a href="/Careers">Careers</a></li>
    <li><a href="/Events">Classes and Events</a></li>


    ........................



    .....enter image description here



    enter image description here










    share|improve this question


























      0












      0








      0








      I want to click on the href link as per attached image, And I've tried the below code but seems like it's not working. Please help me.



      .....



      driver.findElement(By.xpath("//a[@href='Careers']")).click();



      ............



      Here is HTML content for Div tag...
      ..............





       <div class="logo">
      <img src="/ui/healthcare/assets/images/core/ascension_logo_white.svg" alt="Ascension">
      </div>


      <ul class="list-group">
      <li>
      <h4>Get Involved</h4>
      <ul class="link-list">
      <li><a href="/Careers">Careers</a></li>
      <li><a href="/Events">Classes and Events</a></li>


      ........................



      .....enter image description here



      enter image description here










      share|improve this question
















      I want to click on the href link as per attached image, And I've tried the below code but seems like it's not working. Please help me.



      .....



      driver.findElement(By.xpath("//a[@href='Careers']")).click();



      ............



      Here is HTML content for Div tag...
      ..............





       <div class="logo">
      <img src="/ui/healthcare/assets/images/core/ascension_logo_white.svg" alt="Ascension">
      </div>


      <ul class="list-group">
      <li>
      <h4>Get Involved</h4>
      <ul class="link-list">
      <li><a href="/Careers">Careers</a></li>
      <li><a href="/Events">Classes and Events</a></li>


      ........................



      .....enter image description here



      enter image description here







      selenium selenium-webdriver selenium-chromedriver






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 12:03







      ajay kumar

















      asked Mar 8 at 11:13









      ajay kumarajay kumar

      285




      285






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Try this below xpath



           driver.get("https://healthcare.ascension.org/"); 
          JavascriptExecutor js = ((JavascriptExecutor) driver);
          js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
          JavascriptExecutor executor = (JavascriptExecutor) driver;
          executor.executeScript("arguments[0].click();",driver.findElement(By.xpath("//a[@href='/Careers']")));





          share|improve this answer

























          • It's not working, It's showing 'Element is not displayed'

            – ajay kumar
            Mar 8 at 11:23











          • ok.wait for the element to load.

            – Kajal Kundu
            Mar 8 at 11:24











          • but I already define the wait.

            – ajay kumar
            Mar 8 at 11:26











          • try the modified code.

            – Kajal Kundu
            Mar 8 at 11:27











          • if it is not working check the if there any iframe if it is you have to switch to iframe first.

            – Kajal Kundu
            Mar 8 at 11:29










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062026%2fhow-we-can-click-on-href-link-under-selenium-webdriver%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Try this below xpath



           driver.get("https://healthcare.ascension.org/"); 
          JavascriptExecutor js = ((JavascriptExecutor) driver);
          js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
          JavascriptExecutor executor = (JavascriptExecutor) driver;
          executor.executeScript("arguments[0].click();",driver.findElement(By.xpath("//a[@href='/Careers']")));





          share|improve this answer

























          • It's not working, It's showing 'Element is not displayed'

            – ajay kumar
            Mar 8 at 11:23











          • ok.wait for the element to load.

            – Kajal Kundu
            Mar 8 at 11:24











          • but I already define the wait.

            – ajay kumar
            Mar 8 at 11:26











          • try the modified code.

            – Kajal Kundu
            Mar 8 at 11:27











          • if it is not working check the if there any iframe if it is you have to switch to iframe first.

            – Kajal Kundu
            Mar 8 at 11:29















          1














          Try this below xpath



           driver.get("https://healthcare.ascension.org/"); 
          JavascriptExecutor js = ((JavascriptExecutor) driver);
          js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
          JavascriptExecutor executor = (JavascriptExecutor) driver;
          executor.executeScript("arguments[0].click();",driver.findElement(By.xpath("//a[@href='/Careers']")));





          share|improve this answer

























          • It's not working, It's showing 'Element is not displayed'

            – ajay kumar
            Mar 8 at 11:23











          • ok.wait for the element to load.

            – Kajal Kundu
            Mar 8 at 11:24











          • but I already define the wait.

            – ajay kumar
            Mar 8 at 11:26











          • try the modified code.

            – Kajal Kundu
            Mar 8 at 11:27











          • if it is not working check the if there any iframe if it is you have to switch to iframe first.

            – Kajal Kundu
            Mar 8 at 11:29













          1












          1








          1







          Try this below xpath



           driver.get("https://healthcare.ascension.org/"); 
          JavascriptExecutor js = ((JavascriptExecutor) driver);
          js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
          JavascriptExecutor executor = (JavascriptExecutor) driver;
          executor.executeScript("arguments[0].click();",driver.findElement(By.xpath("//a[@href='/Careers']")));





          share|improve this answer















          Try this below xpath



           driver.get("https://healthcare.ascension.org/"); 
          JavascriptExecutor js = ((JavascriptExecutor) driver);
          js.executeScript("window.scrollTo(0, document.body.scrollHeight)");
          JavascriptExecutor executor = (JavascriptExecutor) driver;
          executor.executeScript("arguments[0].click();",driver.findElement(By.xpath("//a[@href='/Careers']")));






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 8 at 12:17

























          answered Mar 8 at 11:19









          Kajal KunduKajal Kundu

          2,7511315




          2,7511315












          • It's not working, It's showing 'Element is not displayed'

            – ajay kumar
            Mar 8 at 11:23











          • ok.wait for the element to load.

            – Kajal Kundu
            Mar 8 at 11:24











          • but I already define the wait.

            – ajay kumar
            Mar 8 at 11:26











          • try the modified code.

            – Kajal Kundu
            Mar 8 at 11:27











          • if it is not working check the if there any iframe if it is you have to switch to iframe first.

            – Kajal Kundu
            Mar 8 at 11:29

















          • It's not working, It's showing 'Element is not displayed'

            – ajay kumar
            Mar 8 at 11:23











          • ok.wait for the element to load.

            – Kajal Kundu
            Mar 8 at 11:24











          • but I already define the wait.

            – ajay kumar
            Mar 8 at 11:26











          • try the modified code.

            – Kajal Kundu
            Mar 8 at 11:27











          • if it is not working check the if there any iframe if it is you have to switch to iframe first.

            – Kajal Kundu
            Mar 8 at 11:29
















          It's not working, It's showing 'Element is not displayed'

          – ajay kumar
          Mar 8 at 11:23





          It's not working, It's showing 'Element is not displayed'

          – ajay kumar
          Mar 8 at 11:23













          ok.wait for the element to load.

          – Kajal Kundu
          Mar 8 at 11:24





          ok.wait for the element to load.

          – Kajal Kundu
          Mar 8 at 11:24













          but I already define the wait.

          – ajay kumar
          Mar 8 at 11:26





          but I already define the wait.

          – ajay kumar
          Mar 8 at 11:26













          try the modified code.

          – Kajal Kundu
          Mar 8 at 11:27





          try the modified code.

          – Kajal Kundu
          Mar 8 at 11:27













          if it is not working check the if there any iframe if it is you have to switch to iframe first.

          – Kajal Kundu
          Mar 8 at 11:29





          if it is not working check the if there any iframe if it is you have to switch to iframe first.

          – Kajal Kundu
          Mar 8 at 11:29



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55062026%2fhow-we-can-click-on-href-link-under-selenium-webdriver%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to get text form Clipboard with JavaScript in Firefox 56?How to validate an email address in JavaScript?How do JavaScript closures work?How do I remove a property from a JavaScript object?How do you get a timestamp in JavaScript?How do I copy to the clipboard in JavaScript?How do I include a JavaScript file in another JavaScript file?Get the current URL with JavaScript?How to replace all occurrences of a string in JavaScriptHow to check whether a string contains a substring in JavaScript?How do I remove a particular element from an array in JavaScript?

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

          List of MPs elected to the English parliament in 1640 (April) Contents List of constituencies and members See also Notes References Navigation menueNational Archives – The Glynde Place ArchivesCobbett's Parliamentary history of England, from the Norman Conquest in 1066 to the year 1803'Aldermen in Parliament', The Aldermen of the City of London: Temp. Henry III – 1912onepage&q&f&#61, false 229