Cannot instantiate class error on running TestNG class & SessionNotCreatedException - class

enter image description hereenter image description hereI'm trying to run a TestNG class and my chrome & chromedriver is of version same version(107) but im getting the below error.
And please note when i run any junit class its running successfully ,opening the browser & doing what it is specified to do. I have used the same driver in both the junit & TestNG classes, but cant understand why im getting chromedriver error.
I was hoping that it would open the chrome & login to the mentioned site
enter image description here

Related

ionic custom plugin and its wrapper issue-ionic 3,4+

I have followed this below vlog completely and was able to create custom plugin and its wrapper and was able to successfully use in ionic v3, and 4+, but after installing the .apk file on device, I get to see error as "Plugin not found".
Please help with the guidance if any. check the below link for that vlog :
Part 1-ionic wrapper creation tutorial
Part 2-[ionic wrapper creation tutorial][2]
Screenshot of after installation of apk- "plugin not found" issue on device
[1]: https://www.youtube.com/watch?v=w9zYXelkl6I&list=PLiuv1WieXgPf4cjcGfQU-IrSX2_3CkWE_&index=25
[2]: https://www.youtube.com/watch?v=Q6PaFEDonac&list=PLiuv1WieXgPf4cjcGfQU-IrSX2_3CkWE_&index=25

How do I create an Android App Bundle using Android Studio, command line (first steps from Android instructions don't work, not fully explained)?

Hello and thanks for helping me solve my problem! I ask for an easier way, as I am trying to figure it out without success in this tutorial https://developer.android.com/guide/app-bundle. So far, I only worked with the Google Play Console itself, did not create an application in a third-party service. I first tried to download the Android App Bundle using Android Studio as described in this article https://medium.com/androiddevelopers/building-your-first-app-bundle-bbcd228bf631, but the first step describes pressing buttons that are not on Android Studio Panel "In Android Studio, select“ Build => Generate Signed Bundle / APK ”and follow the dialog." I do not see the options I need in the Android Studio panel (I attach a screenshot)enter image description here
, where do I need to click to create an Android App Bundle? Then I tried to create the Android App Bundle from this tutorial using the command line https://developer.android.com/studio/build/building-cmdline, I installed Grable manually as described in this tutorial https://docs.gradle.org/current/userguide/installation.html#installation unpacked and configured the system environment, as well as installed and unpacked JDK 17 for Windows/x64 (also on disk C but in a different non-Grable folder), but verifying the Grable installation when typing gradle -v in Windows PowerShell throws an error, and these instructions https://docs.gradle.org/current/userguide/troubleshooting.html#sec:troubleshooting_installation does not offer a solution what is displayed in my Windows PowerShell enter image description here
(The sentence highlighted in red from the screenshot in English looks like this "grable: The name grable is not recognized as the name of a cmdlet, function, script file or executable program. Check the spelling of the name, as well as the presence and correctness of the path, and then try again."), and when I enter gradle -v into the command line, it says "Grable is not an internal or external command, an executable program or a batch file.", I face the same problem if I enter into command line ./gradlew bundleRelease as suggested in this tutorial https://medium.com/androiddevelopers/building-your-first-app-bundle-bbcd228bf631. I'm stumped, what am I doing wrong, and what method is easier for me to create an Android App Bundle? Thanks again for the help in solving my problem and I apologize in advance if I have provided little information necessary to solve my problem.

flutter application is not created even after the andrroid and flutter plugin installation setup

flutter application is not created even after the android and flutter plugin installation setup.
I have followed the following steps as given in the link
Flutter Installatioon steps
I dont know where I went wrong,. which installation steps I have missed.
My system is windows 32 bit.
I am encllosing the required screen shotsError screenshot
my system configuration
User Variable. path
Pleasee help me by fixing this issue
Try using Git instead of command line (cmd) and fix the path for flutter you should get the correct address for that for example: C:\flutter\bin

Unable to execute testng in eclipse

I'm usually able to run my test with testng just fine. Now when I click "run as testng", all it does is as shown in the image below. There's no output or error message in the console.
Eclipse TestNg
The image is showing 2 tasks; happens that I clicked twice when I captured the image.
To drill down the problem, I'm just running a very simple test:
#Test
public void test(){
Assert.assertTrue(true);
}
I tried to restart PC, restart Eclipse, install fresh copy of Eclipse/testng and JDK but no luck.
Any help would be much appreciated!
the problem is related to the change i made to the host file. got it working again by removing all the losthost entries in the host file

How can I set up Eclipse/Selenium to run scripts on other browsers on a Mac?

Im new to Macs and Im having issues trying to run scripts on any browser, let alone IE or Chrome. Here is what Ive done so far:
Installed the latest versions of Eclipse, Selenium standalone server and Selenium IDE
Installed TestNG framework for Eclipse
Installed Selenium web driver and the JAVA libraries
So far all I can do is just run the test scripts Ive created on FF12.
I have created some test scripts on FF12 using Selenium IDE, then exported them to Eclipse with TestNG and when I try to run them I get this error message "Please add the directory containing ''firefox-bin' or 'firefox'' to your PATH environment"
I have a feeling im missing a lot of steps to properly configure Eclipse & Selenium to run scripts on other browsers (ideally IE9 and the latest version of Chrome). And if thats not bad enough, im using a MacBook Pro (Ive been a PC person all my life). Please be gentle and any advice that I can get would be highly appreciated. Thanks
Short answer
Seems like your firefox executable in not in the system path or in the default location. There are multiple ways to fix this
1.Set the firefox binary path in code
You need to set the webdriver.firefox.bin property. In java you can do this by using the following code:
FirefoxProfile profile = new FirefoxProfile();
WebDriver driver = new FirefoxDriver(new FirefoxBinary(new File("path/to/your/firefox.exe")), profile);
2.Find where your firefox is installed and update that path in your path variable
export PATH=/my/firefox/path/bin:$PATH
3.Specify webdriver.firefox.bin as a system property when you start selenium server.
java -jar seleniumserver.jar -D webdriver.firefox.bin = "/path/to/firefox-bin
Once you do one of the above, your issue should be resolved.
Not so short answer - Why it fails?
Per FirefoxDriver javadoc -
org.openqa.selenium.firefox.FirefoxDriver
An implementation of the {#link WebDriver} interface that drives
Firefox. This works through a firefox extension, which gets installed
automatically if necessary. Important system variables are:
webdriver.firefox.bin - Which firefox binary to use (normally
"firefox" on the PATH).
webdriver.firefox.profile - The name of the
profile to use (normally "WebDriver").
Here, webdriver.firefox.bin determines the path of firefox.exe (in windows) or firefox (in mac).
Usually, when you install firefox in your machine the path to firefox file gets added to the path variable. This will allow the user to call firefox from any place.
Webdriver will look for this firefox executable in the path variable and then in the default location. From selenium code, this default path is defined as given below:
case MAC:
if (!binaryName.endsWith(".app"))
binaryName += ".app";
binaryName += "/Contents/MacOS/firefox-bin";
break;
If your firefox file is not available in /Contents/MacOS/firefox-bin then webdriver will not know where to find it. Hence the failure.