Libraries & Frameworks

In my script below code when Thread.sleep() is not used, then it throws an exception “element click intercepted: Element <button _ngcontent-yyo-c131=”” class=”btn btn-sm btn-light border ml-3″>…</button> is not clickable at point (226, 567).
When using the Thread.sleep() it runs and clicks on the Next button, but the problem is that in my application total 9 times next button should be clicked.
For that I printed message on the log so here only 6 times message gets printed (‘btn50-400clicked’) and then next button is disabled and unable to proceed to next code.
Even after waiting for up to 30 minutes it’s not working.
How do I resolve it?
var next=WDS.browser.findElement(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))

while(next.isEnabled())
{
java.lang.Thread.sleep(9000);
//var wait15=new org.openqa.selenium.support.ui.WebDriverWait(WDS.browser, 20000)
//wait15.until(org.openqa.selenium.support.ui.ExpectedConditions.invisibilityOfElementLocated(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”)))
var wait9 =new org.openqa.selenium.support.ui.WebDriverWait(WDS.browser, 9000)
wait9.until(org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))).click()
//next.click();
WDS.log.info(‘btn50-400clicked’)

}
WDS.log.info(‘btn2clicked’)
//java.lang.Thread.sleep(3000);
if(!next.isEnabled()){
WDS.log.info(‘Next button disabled’)}

I am looking for a solution for the below problem statement:

Authentication is done through ADFS.
I recorded a script via jmeter/blazemeter/badboy, but observed that RequestSecurityTokenResponse is never returned in response for any request.
Observed that the RequestSecurityTokenResponse is directly sent over a URL via reply by ADFS.

Due to above situation I am not able to extract the RequestSecurityTokenResponse and hence I’m not able to parameterize it.

I’m working on automation test for a big project and I’m using Phpunit for functional test and as a server selenium webdriver.
I want to execute many tests using different browsers, I don’t know what’s the appropriate configuration to addend my objective, it’s in phpunit.xml or in the test class, because in the SetUp() method I can work only with one browser.
This is my SetUp() method
public function setUp()
{
$capabilities = array(WebDriverCapabilityType::BROWSER_NAME => ‘internet explorer’);
$this->webDriver = RemoteWebDriver::create(‘http://10.157.3.206:4570/wd/hub’,$capabilities);
}

I tried to follow this Link :
http://elnur.pro/using-environment-variables-to-add-flexibility-to-phpunit-tests
But Error is generated , Class Browser Not found
Can anyone help me to resolve this ??

I’ve started investigating dogtail as a solution for writing GUI-driven unit tests in a GNOME Wayland session. Before I dive deeper I want to understand what I’ll need to run these GUI-based tests on a remote server. (I’ve been bitten before by assumptions about the graphics capabilities of VMs and containers.)

So my plan is to:

Create a fresh clone
Run apt update and apt upgrade
Install packages and test scripts
Run a script to log into a desktop session (how?)
Run the test scripts in a live desktop session
Record the results
Exit the desktop session (how?)
Destroy the clone

If the original snapshot is taken while in a desktop session, I can avoid steps 3 and 7, and just execute steps 2, 3, 5 and 6 in the session, but I’d prefer to have the option of a “first login” test.

What capabilities am I looking for in the hosting server and software? If I can use a local client to access a visual desktop session, is that sufficient?

(Concrete examples of viable hosts are welcome but not required. I’m trying to understand the principles rather than picking any particular tool.)

Have you accidentally closed a tab in your browser and finding for a quick fix on how to reopen a recently closed tabs on Desktop, Android, and iPhone. Here we will show you how to restore a browser window you just closed by accident. Accidentally closing a tab is a common problem that can happen…
The post [Fix] How To Reopen Recently Closed Tabs In Chrome, Firefox, Safari, Edge appeared first on Software Testing Material.

When I am trying to run the below mentioned Selenium web driver code in IE 11 browser, I get below error:
Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to find element with css selector == #text-input-what

Code:
package com.indeed.tests;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;

public class IndeedJobSearch {

public static void main(String[] args) {
// TODO Auto-generated method stub
// Call the IE server to invoke IE browser
System.setProperty(“webdriver.ie.driver”,”C:\Users\paulso\Desktop\Testing\Automation\Selenium Automation\IEDriverServer_Win32_3.14.0\IEDriverServer.exe”);
// Create Internet explorer driver to driver the browser
WebDriver driver= new InternetExplorerDriver();
// Maximize the window server.
driver.manage().window().maximize();
// Open Indeed home page
driver.get(“https://www.indeed.co.uk/”);
driver.manage().timeouts().implicitlyWait(10,TimeUnit.SECONDS);
// Find What field and enter Selenium
driver.findElement(By.id(“text-input-what”)).sendKeys(“Selenium”);
}
}

Error (Console log):
Started InternetExplorerDriver server (32-bit)
3.14.0.0
Listening on port 8609
Only local connections are allowed
Sep 20, 2018 11:31:15 AM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: W3C
Exception in thread “main” org.openqa.selenium.NoSuchElementException: Unable to find element with css selector == #text-input-what
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html

I am not able click on the specific element, which is in the image format. I have tried using available locators i.e id and image using XPath and remaining locators are same for all remaining menus.

Below is the HTML code. In the below code class locator is same for all other menus. How to automate this type of scenario?

<a href=”#” class=”nav-link nav-toggle” onclick=”OnReportImageClick()”>
<img src=”/Images/reports.png”>
<span class=”title”>Reports</span>
</a>

The XPath I have tried is //*[@id=”ReportsView”].

Whenever I ran the test logs are not displayed in log viewer panel in application, logs are displayed in command prompt.

Can anyone pls suggest for this issue?
How can I see logs in log viewer panel instead of cmd prompt?

I was enabled logviewer check box also.

I am using Gradle 4.6 with testng. My test suite has tests organized something like these.

java class1
{
test 1.1
test 1.2
test 1.3
test 1.4
}

java class2
java class3
java class4
java class5

All these classes have total 100 tests in the suite. When I execute the suite, gradle first executes, tests 1.1 and 1.2 and then goes and executes all the tests in class2 to 5 and finally comes back to class 1 to execute 1.3 and 1.4.

Is there a way we can force all the tests in a class to be executed before going to class? For example, it will be helpful, I get all my tests in class1 completes execution, then goes to next class (in any order) and so on.

I do not want to set dependency as any failures will force the dependent test to skip, these are independent tests, eventhough there is some dependency declared tests within the same class.