Modal page Automation using Selenium webdriver - java

I am using Java and selenium webdriver for WebAutomation. The scenario is like, when we click on the particular option the new Modal page gets opened. However, with help of Webdriver, when I click on that particular option the modal page is not getting opened. Please suggest me how can do this

It seems Click() is not happening on the Particular Option which opens up the modal page

Related

How can I open an url after close selenium webdriver?

I have a special problem. I made a software in java, what strore informations from a website. But this website shows this data, just if I click a button. It's a simple webdriver problem, but I can click a button only 10 times. It's a very big problem form me, and I cant't do this. :D
The site counts my clicks, if I reach ten clicks, it tells me, I should login. But, it possible to login only with facebook or google account. I don't want to login with facebook or google.
The solution is, I have to close the browser, and I have to reopen that. How can I do this:
driver.close();
driver = new FirefoxDriver();
Okay, but every time when I use this formula, the java code opens a new webdriver. What is the solutin of this problem? Maybe driver.quit(); ??
No!!
If I quit the driver, I can't create a new driver. So, when I open the 321654th webpage, I have 321654/10 webdriver among Windows tasks.
What is the real solution?
Have you tried deleting cookies? You might also then have to refresh the page.
driver.manage().deleteAllCookies()
Try with refresh your page instead of close. Use below code:
driver.navigate().refresh();

Select the "back" button of the Firefox browser to right click and Select the Option from the right click Menu in Selenium Web Driver - Java

I am using Selenium webdriver . I want to select the "back " button of the firefox and right click the back button and select an option.
I see there is "Actions" API to right click, But i am not able to select/find the "back" button element of the firefox to right click using selenium .
Can any one please help me .
Code iam trying is :: Using firefox Driver to inittate the Webdriver
Actions action= new Actions(driver);
action.contextClick(productLink).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.ARROW_DOWN).sendKeys(Keys.RETURN).build().perform();
In the above code , in place of "productlink", i should select the back button element of the firefox browser to right click .
You cannot do that with Selenium.
You can use AutoIT with Selenium to click on that.
Refer to the following article on how to use AutoIT.
http://toolsqa.wpengine.com/selenium-webdriver/autoit-selenium-webdriver/
Here is what you can do. Try to use "Navigation" Commands in selenium.
driver.navigate().to("http://www.DemoQA.com");
there are many commands you can perform on it. If you still find issues using it let me know.

How to close dialog by Selenium?

I want close browser file window pop-up (when I upload picture to Wordpress).
I tried
driver.close();
driver.findElement(By.id("set-post-thumbnail")).sendKeys(Keys.ESCAPE);
driver.switchTo().alert().dismiss();
but it doesn't work. How to close dialog by Selenium?
OS Specific dialogs like File Browser can not be controlled by Selenium.
It can handle only WebElements or JavaScript/Browser Alerts.
In this specific case, I think it is upload file browser.
Workaround may be to pass the absolute path if some text input field is provided along with "Browse" button.

How to close the newly popup window in selenium webdriver

When I click on one button, it goes to another screen and one new popup window appeared. I don't know how to close. Can any one help me out this? Im using Eclipse for writing code.
If the child window is a HTML window then you can close the window by using driver.close() syntax. Here assume driver is instantiated properly.
If it is a Native or OS window then it is not possible to handle it through selenium.

Finding a tab within a page using selenium webdriver

I am a newbie to selenium and am trying to access the tab full score card tab on the folloing website.
http://www.espncricinfo.com/icc-womens-world-cup-2013/engine/current/match/594903.html.
My code in Java is :
driver.get("http://www.espncricinfo.com/icc-womens-world-cup-2013/engine/current/match/594903.html");
driver.manage().timeouts().implicitlyWait(5L, TimeUnit.SECONDS);
driver.findElement(By.xpath("//*[#id='st_1']")).click();
However it does not seem to be able to find the tab. Can you please help.
Thanks
The "tab" is in an iframe
Before you can do anything with an element in an iframe, you have to "activate" the frame with driver.switchTo().frame("live_iframe")

Categories

Resources