Selenium unable to interact with Javascript pop-up box

I am currently working on automating a feature for our web application, specifically a form of @mentioning similar to Facebook. On the front end, when a user types @ into a text input, the API is called to retrieve the list of users and display them in a box that appears. This element is located at the end of the DOM and remains invisible until triggered by Javascript upon typing @.

Despite using send_keys in my selenium code to populate the @username, the user window element does not appear, even if I do it manually while the browser is open via selenium.

I have attempted various methods such as the upkey event from Action Chains, injecting JavaScript to trigger the event, clicking back onto the text input to ensure focus, but nothing seems to work. This issue persists in both Chrome and Firefox.

I have searched extensively for solutions, but no luck so far. Any suggestions?

Feature step:

And I create a post titled "@James"

Implementation:

@when('I create a post titled "([^"]*)"')
    def step_impl(context, text):
        page = ActivityStreamPage.NewPost(context)
        page.post_input.click()
        page.post_input.send_keys(text)

Element:

'post_input': (By.CLASS_NAME, "js-post-textarea")

Web Element:

<div class="js-post-textarea js-edit-content editor__editable" 
contenteditable="true" autocomplete="off" autocorrect="off" 
autocapitalize="off" placeholder="Write a post or @mention to notify 
someone"><span class="atwho-query">@</span><br></div>

User Box:

<div class="atwho-view" id="at-view-64" style="display: none; top: 
    135px; left: 440px;">
    <ul class="atwho-view-ul">
        <li class="mention__item cur">
            <p class="mention__notice">
                <span>@Group</span>
                "Notify everyone in this Group."
            </p>    
        </li>
    </ul>
</div>

Answer №1

Upon extensive troubleshooting, it became apparent that the AJAX call was being denied due to permissions. This issue lies with the application itself rather than selenium.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Transforming the mui stepper connection into a progress bar is simple. Each step contains individualized content to guide you through the process

Is there a way to make the MUI stepper connector act as a progress indicator? I have step content and connectors as separate divs, but I'm having trouble styling them. Any assistance would be greatly appreciated! ...

What could be causing render_template to fail when attempting to update the same parameters more than once?

Lately, I've dived into the world of Flask, MongoDB, and ElasticSearch. So far, my MongoDB and ElasticSearch setups are running smoothly. However, I've encountered an issue with generating a list of dictionaries and displaying them on my HTML we ...

What components make up a multipart email?

The story behind... Some time ago, I created a Python program that handles email messages. One aspect that always puzzled me was determining whether an email is "multipart" or not. After some investigation, I learned that it involves emails containing HT ...

trouble combining two arrays of JavaScript objects

I'm facing a challenge with an object array. I need to add a new object "WITH" a specific index, but I'm unsure of the correct approach. This is my current attempt: //ORIGINAL DATA: this.fetchedData = [{ "startMinute": 0, //Remove "annotati ...

Can Acumatica support the loading of external JavaScript files or libraries?

I am currently developing a new Acumatica screen for our company that will involve integrating javascript code to retrieve and display a map object (from ESRI). The challenge is that this code necessitates an external .js file which the javascript code it ...

The altered variable refuses to show up

Currently, I am working on a project to create a Skate Dice program that will select random numbers and display the results simultaneously. Unfortunately, I have encountered an issue where the randomly generated number is not being shown; instead, it dis ...

Guide on transmitting data from a child component to a parent object in Vue.js?

When I attempt to utilize a child component with custom form inputs and emit those values to the parent component, I encounter an issue where one input value disappears when another input value is entered. Let me showcase some code: Child Component <tem ...

When async is set to true in an Ajax call, the response may come

I recently developed a function that works perfectly fine when the async option is set to false. However, I am now looking to achieve the same functionality and return value but with async set to true. function Call(param, proc) { var url = "../../ ...

Serving static files in Next.js with specific extensions without triggering a download

I'm facing an issue where I need to serve the stellar.toml file in domain/.well-known/stellar.toml with the content type as text/plain. The current configuration works only when the stellar file is saved without an extension. It is essential for me t ...

Attempting to retrieve the name of my controller and action within a JavaScript file

After checking out the Stack Overflow link here, I came across a suggested solution: var controllerName = '@ViewContext.RouteData.Values["Controller"].ToString()'; However, despite implementing this code in my JavaScript file, it does not yield ...

There is an error appearing in my .ts code: [ts] The property 'name' is not found in type 'any[]'

While my coding is working fine and data is showing on the page, there seems to be an error occurring in the VSE editor. It is showing something like this: [ts] Property 'name' does not exist on type 'any[]'. This is a snippet of my ...

What steps can I take to identify the reason my "AfterTest" annotation method is not functioning properly?

According to the browserclose() method, Internet Explorer should close at the end of the operation, but it's not closing. Below is the code snippet: Multiple Test: <suite name="TestingSuite"> <test name="Tester"> <classes ...

Even in the face of errors, Selenium with Node.js continues to run seamlessly. The challenge arises specifically with the 107.xx version of the Chrome browser and Chrome driver

Currently, I am employed in a project involving NODE JS (javascript) with selenium webdriver. Package.json- “chai”: “^4.3.6”, “chromedriver”: “^107.0.3”, “geckodriver”: “^3.2.0”, “mocha”: “^10.0.0”, “mochawesome”: “^7. ...

Navigating through a URL to grab a specific JSON object: a step-by-step guide

When I receive a json from a URL containing numerous objects, how can I extract only the slugs provided in the json below? I am open to solutions using either PHP or JavaScript. On one hand, I need to understand how to specifically retrieve the desired ob ...

Error message 'Name or service not known' is triggered by channels_redis in docker-compose network mode bridge

I have a Django application that utilizes channels, channels_redis, and graphene_subscriptions. The graphene_subscriptions package is used to trigger the publishing of a message via channels when a database model instance is saved (DATABASE_MODEL_INSTANCE. ...

Discover the process for finding a Youtube Channel Name with querySelectorAll

OUTPUT : Console URL : https://www.youtube.com/feed/trending?gl=IN document.querySelectorAll('a[class="yt-simple-endpoint style-scope yt-formatted-string"]')[0].innerText; document.querySelectorAll('a[class="yt-simple-endpoi ...

Passing an array of selected values from Vue.js to a text area and adding them to the existing content

I'm facing a situation and I could really use some assistance. The image shows that there is a multiple select box on the left with numbers, and a text box on the right. My goal is to allow users to click on the house numbers in the select box and hav ...

Having issues updating cookies with jQuery in ASP.NET framework

On my asp.net web page, I have implemented a search filter functionality using cookies. The filter consists of a checkbox list populated with various categories such as sports, music, and food. Using a jQuery onchange event, I capture the index and categor ...

Having trouble with Webpack dynamic import not returning files in ReactJS? Here's how to fix it

Struggling with importing and using images in Reactjs? I've imported all images from a folder but it's not returning an array with links. Take a look. function importAll(r) { return r.keys().map(r); } const images = importAll(requi ...

Angular method $http.get is failing to function as intended

This is the HTML and JavaScript code I have written. <!DOCTYPE html> <html ng-app> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <title></title> <meta name ...