0
webDriver driver = new FirefoxDriver();
driver.get("https://www.ignitionone.com/company/careers/");
driver.manage().window().maximize();        
Thread.sleep(2000);

driver.findElement(By.xpath("html/body/div[1]/section[1]/div/div/a/button")).submit();

'View positions' button is not clicking with the above code.What is happening in the web page?

1
  • Please edit the question with the error that you're facing. Commented Jun 19, 2017 at 16:47

2 Answers 2

2

You see the HTML for this page is

HTML

So, you can use the CSS selector for this as

WebDriver driver = new FirefoxDriver();
driver.get("https://www.ignitionone.com/company/careers/");
driver.manage().window().maximize();        
Thread.sleep(2000);

driver.findElement(By.cssSelector("button.button.teal").click();

And then proceed with doing whatever is necessary. I executed with this in my Python code and it works fine.

Also, you will need to provide the Gecko executable path while calling for the FirefoxDriver()

Sign up to request clarification or add additional context in comments.

1 Comment

Below worked for me .Thankyou. driver.findElement(By.cssSelector("button.teal").click();
0

The way I have done it before is to use the click handler.

driver.findElement(By.cssSelector(".profile-actions .primary_button > span")).click();

I'm sure you could also select the element by xpath rather than CSS in the above line. It's a similar question to this one.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.