Why does the iframe in a webpage doesn't load using selenium webdriver? - selenium

A website has two iframes in it. When I manually open the website, both the frames display content. But when I open the website using Selenium WebDriver + Java, the first frame doesn't load while the second frame loads. I tried using explicit wait with expected conditions of element visibility. I also tried refreshing the webpage & clearing the cache and cookies of the web browser.

Related

Bowser disable cross domain cookies in Firefox for opening Visualforce page in an automated browser

I am trying to open a Visualforce page in Firefox using an automation tool (Web driver). While trying this, every time automated browser open the VF page it shows:
We can't display this page because your browser blocks cross-domain
cookies. Try again with a different supported browser.
How to run automation test script for the VisualForce Pages?

Allowing 3rd party cookies in Chrome Webdriver configuration

here's the situation: I load a website A in incognito mode using Selenium Chrome Webdriver. In this website there is a iframe loading information from website B. Chrome Incognito mode blocks the iframe contents because treats it as a 3rd party cookie.
If I allow the cookies from the website B the conents of the iframe show up. If I don't use the incognito mode the contents also show up. However, after manually allowing cookies in Chrome setting it only works during this session. And I need the incognito mode in other tests so I don't want to change configuration between the tests.
Is there a way to set up the Webdriver to allow the cookies from the 3rd party website?

How do I bypass the login page when I am testing Salesforce Lightning using Selenium Webdriver?

I am testing Salesforce Lightning pages on Chrome using Selenium Webdriver code that's in a C# NUnit project in Visual Studio 2019. I get the Login page every time I run a test.
I used to get the Verification page after the login page but after I added the IP address of the Chrome browser to the list of trusted addresses as recommended here,
How to Automate the salesforce login OTP feature using selenium WebDriver?
the verification page is not coming up anymore.
When I test Salesforce using UFT or Selenium IDE, the login page never comes up.
As can be seen in the attached image, I even have the "Remember Me" checkbox checked.
How can I stop the login page from coming up when I am testing Salesforce Lightning using Selenium Webdriver?
Also, how can Selenium recognize Javascript popups on the page like the Allow Notifications popup in the image below?

How to automate shadow dom elements on browser by integrating shady dom api?

We are facing issues while automating the shadow dom elements using selenium web driver on safari browser.
The main issue we are facing is that we are not able to send keys to the text boxes which are in shadow-root. We tried to set value of textbook using javascript but that too is not working.
Above functionality is working fine with Firefox, but problem is with Safari.

Opening Selenium in a Iframe

I am using selenium to perform screen scraping on some application(url).I am using IE/Firefox driver.Can we open the browser which selenium opens in an iframe instead of opening it in a new window.To be more precise driver.get should open the url in an iframe and not a window.
No. You can't open a browser inside an IFRAME. The contents of an IFRAME are always displayed by the same browser that displays the IFRAMEing page.
How to work around this strongly depends on what you are trying to accomplish and on whether you are using Selenium 1 (a browser plugin that rewrites pages by injecting JavaScript into them) or Selenium 2 (which uses WebDriver to communicate with browsers). But I'm pretty sure you'd need to rewrite some of the Selenium software.