Im trying to click a button and usually I do it with the class of the button in puppeteer. But this button doesn't have a class how can I click it then? thx for any help :)
I've tried doing this command and tried if it works.
await page.click("[id='submit-label']");
Related
I am new in automation testing and learning selenium. I was coding for Selenium program for Gmail Login. I am able to hit url and enter username but there is button called "Next" on same page which I am unable to click to go further .I tried clicking same using "xpath".
Below is the html code for that button when I inspected element using FireBug.
<span class="RveJvd" snByac">Next</span>
My code:
WebElement we = driver.findElement(By.id("identifierId")); we.sendKeys("emailid");
driver.findElement(By.xpath("/html/body/div[1]/div[1]/div[2]/div[2]/form/div[2]/div/div[2]/div[1]/div/content/span]")).click();
You can try the following.
WebElement we = driver.findElement(By.id("identifierId"));
we.sendKeys("emailid");
driver.findElement(By.id("identifierNext")).click();
after entering id, and for that next use
driver.findElement(By.id("identifierNext")).click();
after giving password and then for that next use
driver.findElement(By.id("passwordNext")).click();
Try this :
WebElement we = driver.findElement(By.id("identifierId"));
we.sendKeys("emailid");
driver.findElement(By.cssSelector("span[class='RveJvd']")).click();
I am writing tests for my Bootstrap 3.x webapp using Nightwatch. All is working fine, but I would like to add the "close modal by clicking somewhere next to it" in one of my tests. I don't seem to be able to identify the html element that's supposed to receive the click event however.
Can anyone help me with this?
Thanks!
The background is a div with class .modal-backdrop. According to the docs: "...generates a .modal-backdrop to provide a click area for dismissing shown modals when clicking outside the modal."
I am trying to make an href tag that has custom styling on it however when I click the button, I am not redirected to the link I have provided. My button is:
Connect Account
I can see the link is on the button when I hover my mouse over the button however, nothing happens when I click it. Any ideas on why this is happening? Thanks anyone who knows what I am doing wrong.
is there a way to create a HTML button, which simulates space-bar pressing on the keyboard?
So, whenever I press space bar or click the button, I get the same result.
Thanks in advance.
I'm trying to fix this issue I'm having. I am trying to get it so when a user clicks the login button, it will make the <div> drop down. The <div> does drop down, but the page teleports to the top of the page when you click the button. And that's an issue for me.
So can anyone fix this code to make it so the page doesn't teleport up every time they press the LOGIN button?
Thanks for all help in advance~
Here is the link to the code - http://jsbin.com/oyujoy/4/edit
Change your link from:
LOGIN
To:
LOGIN
See: http://jsbin.com/apudem/1/