Currently I am working on serializing a Java object to JSON using Gson. My goal is to exclude a specific field in one class while keeping it in another. Here's a snippet of the code: Class A { var a; var b; } Class B { var a; var c; } Class C { ...
Hello everyone! This is my first question on this platform, so please bear with me if I'm missing any important details. I'll add them as soon as possible. I am currently working on setting up a camel route where I retrieve a URL from my Database and send ...
Attempting to retrieve a String value from an action class using the $.getJSON method, but receiving an output of undefined. Below are the code snippets that have been tested: Script: $(function() { $("#newPostionFormID").submit( ...
I am currently using Appium desktop server version 1.15, java-client version 7.3.0, and selenium-server version 3.141.59. While working on my android emulator, I encountered a situation where I needed to scroll down to view a specific text and then stop t ...
I am dealing with a webservice that uses RestEasy to return a JSON object with a List element. When I try to parse the results in a JavaScript loop, everything works fine if there are two or more elements in the List. However, if there is only one element, ...
Code: public class ContactFormTest { WebDriver driver; @BeforeMethod public void setUp() { System.setProperty("webdriver.chrome.driver", "Driver Path"); driver=new ChromeDriver(); driver.get("URL"); driver.manage().deleteAllCookies(); driver.manage().wind ...
Currently, I am using Selenium WebDriver (also known as Selenium 2) in conjunction with Java. In an attempt to click the "Sign In" button on Yahoo mail, I have crafted the code below: driver.findElement(By.id(".save")).click(); Regrettably, this code is ...
Looking for the XPath to click on an image in the mobiles section of Flipkart's website, specifically the realme shop. I have identified the necessary XPath and prepared the code as follows: package Test; import org.openqa.selenium.By; impo ...
Currently, I am working with Selenium and encountering an issue with one of the Xpaths in relation to creating a Gmail account. The problem lies with selecting the birth month option on the page. The Xpath I have provided below appears to be correct when e ...
In my current situation, there is a requirement for a class labeled as "Pre-Requisite" to be executed initially. Following that, I have 5 TestNG classes which need to utilize specific data gathered from the "Pre-Requisite.java" class and then run all 5 cla ...
I am facing a challenge when trying to upload a file on my MAC using selenium with Java. The button I need to interact with does not have an input tag, so I attempted to use robot script and even apple script but haven't been successful. Is there anyone wh ...
Is there a more efficient way to handle multiple parsing requests in Selenium when loading a page, rather than making individual http requests for each element? Can I convert the source code obtained from driver.getPageSource() into an HTML object to st ...
When it comes to uploading a video, there are two options available: 1) Provide the web URL for the video, 2) Upload the actual video file. The <video> tag works smoothly with a web URL as the source, but issues may arise when trying to play an uplo ...
Attempting to utilize automated bots here, I am in need of retrieving the last day of the previous month. The bot performs accurately on the current month during the first run; however, when transitioning to the next month, the date retrieved from this cod ...
This is the HTML code snippet that I am working with: <div id="sieb-ui-popup-mvg-selected" class="AppletStylePopup"> <form onsubmit="return false;" action="/ecom_enu/start.swe" method="post" name="SWEForm4_0"> <div class="siebui ...
Currently tackling an automated testing project with Selenium 2.0 and finding the API to be quite low-level. Interested in refactoring common tasks like form handling to avoid repetitive code. Experienced difficulty locating a collection of contributed c ...
Is it possible to integrate karate and selenium for my testing needs? I have followed instructions on how to call the "JavaApiTest class" and added the necessary karate-core dependency. However, when I attempt to run my tests using the cucumber runner, I e ...
While trying to run a Selenium test script on the Chrome browser, I encountered some problems. When Selenium tries to launch the Chrome browser, it opens up with a blank page and I also received a pop-up message saying that chromedriver.exe has stopped wor ...
I am encountering an issue while attempting to click on a link that resembles a tab button using Xpath. Here is the snippet of html: <div id="tile_8" style="height: 93px; width: 26%; background-color: rgb(45, 87, 19); color: white; position: relativ ...
My task involves handling a CSV file with 10 columns and multiple rows. The goal is to convert each row into a JSON object. An example of the file structure is as follows: Name, Age, Address..........and other columns ABCD, 23 , HOME.............and other ...
I am in search of a way to utilize org.w3c.dom.Node for data types other than XML, such as json or avro. With this implementation, I can make use of functions designed for org.w3c.dom.Node, like xpath. org.w3c.dom.Node document = new JsonDocument(myJsonMe ...
I am encountering an issue with logging into a website that displays a popup asking for my username and password as soon as I land on the site. Even though I have tried using https://username:<a href="/cdn-cgi/l/email-protection" class="__cf_email__" d ...
Have you come across a standardized regular expression that captures all valid mobile phone numbers, such as 00923465655239 or +923005483426? I've been searching for it for two days but haven't found an expression that fits these formats. The co ...
As an illustration, consider the following Java code snippet for Selenium automated testing. In this code, I am extracting the value 9 from a static dropdown using the findElement method. The question now is: How can I save this extracted value in a vari ...
My objective is to extract the JSON value from a script tag on a webpage. The challenge lies in the fact that the JavaScript tag contains numerous functions alongside a JSON array. I have managed to convert the entire script into string format using jsoup, ...
Just a heads up: Some users may have trouble reading code comments. For the record, this is not related to any homework assignment. I'm attempting to combine HTML and a hashmap for the first time. Despite searching for explanations online, nothing see ...
I have been attempting to utilize the capacitor push notifications plugin in a quasar project. I followed this tutorial as a guide. However, upon running the command: quasar build -m capacitor -T android, I encountered this error within my quasar project: ...
Currently, I am utilizing Selenium with Java to create a test. My task involves retrieving the text from inside an input element: <table class="boundaryFormAdd"> <tbody> <tr> <td> <input id="id ...
In my project, I have created two classes named Car.java and Bus.java. Car.java private Property property; Bus.java private Property property; The Property.java class contains attributes for number and colour. ...
I am currently in the process of setting up Ionic on my new computer, but I have encountered an issue while trying to build a Cordova Android project that I can't seem to resolve. The software and versions I am using include: NodeJS v6.9.1 npm ...
I have written a code to extract data from a web table, where each row is read as text and added to another list before being sent to a method for writing to an excel file. However, this process of reading approximately 200 rows and writing the data to a n ...
Encountering a geb.driver.DriverCreationException error while running a Jenkins automation job with Selenium and Groovy on a LINUX computer. Working on an Automation script using selenium with Groovy. Here are the environment details: java version = 1.8.0 ...
I am currently working on a script that automates the login process on a website and performs certain actions. The code for logging in is as follows: WebDriver driver; JavascriptExecutor exec; String dni = "..."; String passwd = "..."; ...
As I delve into the world of test automation, I decided to try my hand at writing a script using Selenium Webdriver. To my dismay, upon running the script, I encountered a barrage of errors that have left me scratching my head in confusion. Despite metic ...
I am new to android development and I am currently working on a project where I need to call a webservice that returns a JSON string as a response. This JSON string contains an XML formatted string as one of the entries. String jsoncontent=restTemplate.ge ...
I have a String that contains JSON formatted information, specifically an OAuth token. How can I extract the refresh_token? This is the JSON data printed from the inputLine: { { "access_token":"ffa6ea48612b19966383fd6b134fe2c4daac80ce31a8632284b ...
Currently, I am facing an issue with retrieving Map values in my Ajax call with JSON data of String, Array and Map. While I am able to successfully get String and Array data by converting them into the Bean class DashboardChartData in Jersey, I am encounte ...
Utilizing the OpenFaces library, I am trying to trigger an ajax request when a checkbox is checked in order to display a TextArea. However, this functionality does not seem to be working as expected. The approach I am using mirrors that of the JSF standard ...
I'm currently learning about RESTful web service implementation using Java in my development environment, which consists of Netbeans IDE with GlassFish v3. Within my project, I have a specific page URL called /inventoryList, which is mapped to the Invento ...
Currently I am conducting web site testing using Selenium. While working with the dropdowns on the site, I have encountered an issue with one particular dropdown. Manual clicking on the dropdown reveals multiple options, however, when I try to access the e ...
I am attempting to read input JSON from a controller When I use the name in the node, everything works fine This is the JSON data: { "itemList": [ { "name": "Alex", "surname": "Ivanov", "age": "25" ...
Embarking on Automation in my current project, I am looking to implement Selenium for Test Automation using Java. With Jenkins (formerly known as Hudson), I aim to generate accurate Test Reports. Could you guide me through the installation and configuratio ...
When attempting to select an option from a context menu, using sendKeys(Keys.ARROW_DOWN) has not been effective. Instead of navigating the context menu, it simply scrolls the page up and down, leaving the menu open. Actions action = new Actions(driver); a ...
Today, I am facing an interesting challenge. I need to extract the page source of a webpage that includes an iframe. Surprisingly, when using the PhantomJSDriver with the code snippet below, I am only able to retrieve either the page content or the iframe ...
I have encountered an issue on my website where clicking a button opens a new tab with a link in the same browser. Now, I am seeking a way to instruct selenium to focus on that newly opened tab. I have experimented with multiple methods but so far none h ...
Currently, I am working on a Java code in Eclipse that involves using Selenium to find and download Instagram Stories of a user onto my computer. While I have successfully been able to download all the photos from the stories window, I have encountered sev ...
When utilizing the org.json json library, converting from XML to JSON is straightforward. However, the conversion back to XML results in JSON attributes being converted into XML nodes: import org.json.JSONObject; import org.json.XML; public class Test { ...
I have parsed a JSON file to extract data such as "Floor", "flat_no", and "Flat_id". Here is an example of the JSON structure: { "results": [ { "Flat_id": "1", "cat": "2", "Flat_no": "101", "Floor": "1", "Flat_t ...
In this code snippet, I have implemented a method for reading data from a JSON file. private void LoadTabaksFromJson() { InputStream raw = mContext.getResources().openRawResource(R.raw.tabaks); Reader reader = new BufferedReader(new InputStreamRe ...
Is it possible to retrieve the parent ID in the provided HTML code using the class name "description"? All div elements have a common class name of "card-box" and their IDs are generated during runtime. <div id="2321-79" class="card-box"></div> ...
I have attempted to use this code but unfortunately it is not functioning properly. Instead, it is displaying a null value. String ServiceName = SitePackageScript.driver.findElement(By.xpath("xxxxxx")).getAttribute("Value"); The HTML <tr> ...
I only want to extract the text "Invitation sent to xxxxx". I do not need the content inside the button tag. <button class="action" data-ember-action="" data-ember-action-3995="3995"> Visualizar profile </button> This is how I am c ...
Is there a way to ensure that Selenium WebDriver waits for an Ajax load before proceeding with any activities? I am automating the process of filling out a form using my script, where I click on a button that opens a new form with some fields prepopulated ...
Running TestNG or Maven tests locally shows that all test cases are working correctly. However, when running the tests in a pipeline, an error is encountered stating "cannot access org.testng.Assert". Attached below are error screenshots of Azure Pipeline: ...
I am currently utilizing WebSocket to create a chat application. Below is the code from my Angular application that sends a MessageModel object to the backend after converting it into a JSON string: sendMessage(message: MessageModel){ let data = JSON.str ...
I have been working on an app that utilizes JSON data. The issue I am facing is that when I retrieve the JSON using HentData.execute() and assign it to a string variable, my program crashes when I try to perform any operations with it. HentData extends As ...
After decompiling a lua file using unluac, I discovered that all the string variables are no longer readable and are now ascii encoded clues = { { answer = { "\216\173", "\216\177", "\216\168", " ...
I am having trouble displaying an error message on the webpage. The error message reads as follows: ERROR Your request has not been successful. You need to contact Customer Care to arrange a replacement. Within the error message above, there is a lin ...
Is there a way to clear the browser's CACHE Memory without having to delete Cookies and risk logging out of my account? ...
When receiving data from the BackEnd, it typically looks like this: {name : String, author : String, updater : String, media : String, } Sometimes, the 'media' field can also be an array with a different structure, but unfortunately I am unable to mod ...
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myexample/com.example.myexample.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object refe ...
How can I submit an excel file from an HTML form input field and send it to a RESTful Java method for processing? I am integrating AngularJS into my project as well. ...
Similar Question: Reading a Json Array in android I am attempting to extract the field names from a string using JSON. While I have successfully retrieved the values, I am struggling to retrieve the field names. Here is an example: String strjson: { ...
Trying to run Selenium tests on a GWT Java application and utilizing the ChromeDriver for this purpose. Requiring the GWT Plugin in the settings, here's the process I follow: @Provides @Singleton protected WebDriver getDefaultWebDriver() throws IOEx ...
I am currently utilizing the Jackson library and attempting to accomplish a task as described here BaseOperationRequest.java @JsonTypeInfo( use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "command" ) @JsonSubTypes({ ...
Identify the 3rd td in tr with a class that includes "zebra" The image displays my current task. I am required to pick out the quantity corresponding to each of the 4 animals, which is always found in the 3rd td of the tr element. In the provided html, yo ...
Here is the breakdown of my current setup: Backend: Utilizing Spring Boot (Java) with an endpoint at :8088 Frontend: Running Vue on a Node development server exposed at :8080 On the frontend, I have reconfigured axios in a file named http-common.js to s ...
I attempted to access my Google account using Selenium and encountered a roadblock. From what I understand, there are some settings that need to be configured for this task. I have already attempted the following: View But unfortunately, it did not provi ...
Can Open Office spreadsheet (ODS) files be utilized for reading and writing data in Selenium with Java? I have conducted a thorough search online but have not been able to find any solutions. Any assistance would be greatly appreciated. ...
I have been attempting to retrieve data from a database and then set the values in a JSON document using an ArrayList. However, I am facing challenges in doing so. Consider this hardcoded JSON that I aim to convert into dynamic JSON. String json = "{ &bso ...
Hey, I'm still learning about servlets so please excuse any confusion in my message! So basically, I'm trying to figure out how to pass a value from a servlet to JavaScript or even retrieve values from a servlet method within JavaScript. But I'm not entire ...
Here is the structure of an unordered list View the structure of the unordered list I am attempting to extract the values of "var" and "time" as strings and store them in an ArrayList List<String[]> finalResult = new ArrayList<>(); This is w ...
Is there a known implementation or pattern for retrieving the "Logical Name" of a Selenium WebElement object in Java? I am interested in something along these lines: @FindBy(xpath = "//tr[2]/td[@class='listrow1'][3]") private WebElement txt ...
I recently started working on my first spring boot project, but I feel like I still have a lot to learn. Despite searching on Stack Overflow and Googling for answers, I haven't found a solution yet. It would be greatly appreciated if someone could provide ...
I need assistance in using Selenium to retrieve search results from Google after entering a specific query. Currently, I have created the following code: WebDriver driver = new ChromeDriver(); driver.get("http://www.google.com/xhtml"); Thr ...